Date: Sat, 23 Aug 2014 17:57:07 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270425 - in head: sbin/ipfw sys/netpfil/ipfw Message-ID: <201408231757.s7NHv7fl052162@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: melifaro Date: Sat Aug 23 17:57:06 2014 New Revision: 270425 URL: http://svnweb.freebsd.org/changeset/base/270425 Log: Whitespace/style changes merged from projects/ipfw. Modified: head/sbin/ipfw/ipfw2.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Sat Aug 23 17:37:18 2014 (r270424) +++ head/sbin/ipfw/ipfw2.c Sat Aug 23 17:57:06 2014 (r270425) @@ -592,7 +592,7 @@ match_token(struct _s_x *table, char *st for (pt = table ; i && pt->s != NULL ; pt++) if (strlen(pt->s) == i && !bcmp(string, pt->s, i)) return pt->x; - return -1; + return (-1); } /** Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Sat Aug 23 17:37:18 2014 (r270424) +++ head/sys/netpfil/ipfw/ip_fw2.c Sat Aug 23 17:57:06 2014 (r270425) @@ -351,10 +351,13 @@ tcpopts_match(struct tcphdr *tcp, ipfw_i } static int -iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) +iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, + uint32_t *tablearg) { + if (ifp == NULL) /* no iface with this packet, match fails */ - return 0; + return (0); + /* Check by name or by IP address */ if (cmd->name[0] != '\0') { /* match by name */ if (cmd->name[0] == '\1') /* use tablearg to match */ @@ -2547,6 +2550,7 @@ sysctl_ipfw_table_num(SYSCTL_HANDLER_ARG return (ipfw_resize_tables(&V_layer3_chain, ntables)); } #endif + /* * Module and VNET glue */ @@ -2734,7 +2738,7 @@ vnet_ipfw_uninit(const void *unused) ipfw_reap_rules(reap); IPFW_LOCK_DESTROY(chain); ipfw_dyn_uninit(1); /* free the remaining parts */ - return 0; + return (0); } /* Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Aug 23 17:37:18 2014 (r270424) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Aug 23 17:57:06 2014 (r270425) @@ -759,14 +759,14 @@ check_action: printf("ipfw: opcode %d, multiple actions" " not allowed\n", cmd->opcode); - return EINVAL; + return (EINVAL); } have_action = 1; if (l != cmdlen) { printf("ipfw: opcode %d, action must be" " last opcode\n", cmd->opcode); - return EINVAL; + return (EINVAL); } break; #ifdef INET6 @@ -809,25 +809,25 @@ check_action: case O_IP6_DST_MASK: case O_ICMP6TYPE: printf("ipfw: no IPv6 support in kernel\n"); - return EPROTONOSUPPORT; + return (EPROTONOSUPPORT); #endif default: printf("ipfw: opcode %d, unknown opcode\n", cmd->opcode); - return EINVAL; + return (EINVAL); } } } if (have_action == 0) { printf("ipfw: missing action\n"); - return EINVAL; + return (EINVAL); } return 0; bad_size: printf("ipfw: opcode %d size %d wrong\n", cmd->opcode, cmdlen); - return EINVAL; + return (EINVAL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408231757.s7NHv7fl052162>