summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael McConville <mmcco@mykolab.com>2019-08-02 10:55:11 -0400
committerDan McDonald <danmcd@joyent.com>2019-08-02 18:43:39 -0400
commit94a5108e6d17b76907472153e979d6261be71c37 (patch)
treec45476ca78e2a28cc7a67de64b4906eb2d2e1b05
parentec82ef794c304d675af6962e1428b3b12ca2be8b (diff)
downloadillumos-joyent-94a5108e6d17b76907472153e979d6261be71c37.tar.gz
8903 IPPF paths have bad logic
Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: John Levon <levon@movementarian.org> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
-rw-r--r--usr/src/uts/common/inet/ip/ip6_input.c10
-rw-r--r--usr/src/uts/common/inet/ip/ip_input.c8
-rw-r--r--usr/src/uts/intel/ip/Makefile4
3 files changed, 9 insertions, 13 deletions
diff --git a/usr/src/uts/common/inet/ip/ip6_input.c b/usr/src/uts/common/inet/ip/ip6_input.c
index c7c241f944..21cd3cd2fe 100644
--- a/usr/src/uts/common/inet/ip/ip6_input.c
+++ b/usr/src/uts/common/inet/ip/ip6_input.c
@@ -199,7 +199,7 @@ ip_input_common_v6(ill_t *ill, ill_rx_ring_t *ip_ring, mblk_t *mp_chain,
ip_recv_attr_t iras; /* Receive attributes */
rtc_t rtc;
iaflags_t chain_flags = 0; /* Fixed for chain */
- mblk_t *ahead = NULL; /* Accepted head */
+ mblk_t *ahead = NULL; /* Accepted head */
mblk_t *atail = NULL; /* Accepted tail */
uint_t acnt = 0; /* Accepted count */
@@ -349,7 +349,7 @@ ip_input_common_v6(ill_t *ill, ill_rx_ring_t *ip_ring, mblk_t *mp_chain,
/*
* Call one of:
- * ill_input_full_v6
+ * ill_input_full_v6
* ill_input_short_v6
* The former is used in the case of TX. See ill_set_inputfn().
*/
@@ -518,7 +518,7 @@ ill_input_short_v6(mblk_t *mp, void *iph_arg, void *nexthop_arg,
ill_t *ill = ira->ira_ill;
ip_stack_t *ipst = ill->ill_ipst;
uint_t pkt_len;
- ssize_t len;
+ ssize_t len;
ip6_t *ip6h = (ip6_t *)iph_arg;
in6_addr_t nexthop = *(in6_addr_t *)nexthop_arg;
ilb_stack_t *ilbs = ipst->ips_netstack->netstack_ilb;
@@ -2021,8 +2021,8 @@ repeat:
*/
if (IPP_ENABLED(IPP_LOCAL_IN, ipst) &&
!(iraflags & IRAF_LOOPBACK) &&
- (protocol != IPPROTO_ESP || protocol != IPPROTO_AH ||
- protocol != IPPROTO_DSTOPTS || protocol != IPPROTO_ROUTING ||
+ (protocol != IPPROTO_ESP && protocol != IPPROTO_AH &&
+ protocol != IPPROTO_DSTOPTS && protocol != IPPROTO_ROUTING &&
protocol != IPPROTO_FRAGMENT)) {
/*
* Use the interface on which the packet arrived - not where
diff --git a/usr/src/uts/common/inet/ip/ip_input.c b/usr/src/uts/common/inet/ip/ip_input.c
index 6aa70b014a..ad753c165b 100644
--- a/usr/src/uts/common/inet/ip/ip_input.c
+++ b/usr/src/uts/common/inet/ip/ip_input.c
@@ -202,7 +202,7 @@ ip_input_common_v4(ill_t *ill, ill_rx_ring_t *ip_ring, mblk_t *mp_chain,
ip_recv_attr_t iras; /* Receive attributes */
rtc_t rtc;
iaflags_t chain_flags = 0; /* Fixed for chain */
- mblk_t *ahead = NULL; /* Accepted head */
+ mblk_t *ahead = NULL; /* Accepted head */
mblk_t *atail = NULL; /* Accepted tail */
uint_t acnt = 0; /* Accepted count */
@@ -367,7 +367,7 @@ ip_input_common_v4(ill_t *ill, ill_rx_ring_t *ip_ring, mblk_t *mp_chain,
/*
* Call one of:
- * ill_input_full_v4
+ * ill_input_full_v4
* ill_input_short_v4
* The former is used in unusual cases. See ill_set_inputfn().
*/
@@ -561,7 +561,7 @@ ill_input_short_v4(mblk_t *mp, void *iph_arg, void *nexthop_arg,
ill_t *ill = ira->ira_ill;
ip_stack_t *ipst = ill->ill_ipst;
uint_t pkt_len;
- ssize_t len;
+ ssize_t len;
ipha_t *ipha = (ipha_t *)iph_arg;
ipaddr_t nexthop = *(ipaddr_t *)nexthop_arg;
ilb_stack_t *ilbs = ipst->ips_netstack->netstack_ilb;
@@ -2361,7 +2361,7 @@ ip_fanout_v4(mblk_t *mp, ipha_t *ipha, ip_recv_attr_t *ira)
*/
if (IPP_ENABLED(IPP_LOCAL_IN, ipst) &&
!(iraflags & IRAF_LOOPBACK) &&
- (protocol != IPPROTO_ESP || protocol != IPPROTO_AH)) {
+ (protocol != IPPROTO_ESP && protocol != IPPROTO_AH)) {
/*
* Use the interface on which the packet arrived - not where
* the IP address is hosted.
diff --git a/usr/src/uts/intel/ip/Makefile b/usr/src/uts/intel/ip/Makefile
index db2647e0a3..e9a8a88ba6 100644
--- a/usr/src/uts/intel/ip/Makefile
+++ b/usr/src/uts/intel/ip/Makefile
@@ -78,10 +78,6 @@ $(OBJS_DIR)/tnet.o := SMOFF += shift_to_zero
SMOFF += signed,all_func_returns
SMOFF += signed_integer_overflow_check
-# definitely wrong
-$(OBJS_DIR)/ip_input.o := SMOFF += or_vs_and
-$(OBJS_DIR)/ip6_input.o := SMOFF += or_vs_and
-
#
# To get the BPF header files included by ipnet.h
#