aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-06-24 15:05:42 +0000
committerMark Johnston <markj@FreeBSD.org>2020-06-24 15:05:42 +0000
commit27b3db97099344c0d8ee13510f493034836f93ed (patch)
treed343d543102e8e0c0c6e357a1de83a6a9558fea8
parent132c073866249f08f40681e3b1eacd2f63432490 (diff)
downloadsrc-27b3db97099344c0d8ee13510f493034836f93ed.tar.gz
src-27b3db97099344c0d8ee13510f493034836f93ed.zip
ipfw(8): In fill_ip6(), use a single statement for both "me" and "me6".
Submitted by: Neel Chauhan <neel AT neelc DOT org> Reviewed by: rgrimes, Lutz Donnerhacke MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24403
Notes
Notes: svn path=/head/; revision=362582
-rw-r--r--sbin/ipfw/ipv6.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sbin/ipfw/ipv6.c b/sbin/ipfw/ipv6.c
index 050cb6d42941..a9259b65a6fa 100644
--- a/sbin/ipfw/ipv6.c
+++ b/sbin/ipfw/ipv6.c
@@ -342,13 +342,8 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, struct tidx *tstate)
if (strcmp(av, "any") == 0)
return (1);
-
- if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/
- cmd->o.len |= F_INSN_SIZE(ipfw_insn);
- return (1);
- }
-
- if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/
+ /* Set the data for "me" opt */
+ if (strcmp(av, "me") == 0 || strcmp(av, "me6") == 0) {
cmd->o.len |= F_INSN_SIZE(ipfw_insn);
return (1);
}