summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2018-02-28 23:28:06 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2018-02-28 23:28:06 +0000
commit78a2d00c461731c87f020dd2d7f1b4aacf1e086b (patch)
tree3e1b72121ae05a40b39ae595d3acff568b5914ca /sys/net
parent9ebc5d478e7c9bf64e4b9f36be0a49be9c471e99 (diff)
fix up matching of incoming traffic to interfaces.
i was assigning to ip dst to both the key src and dst, which meant no traffic matched and it fell through the network stacks ipip processing. based on some excellent investigation by andreas bartelt.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_gif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 3d8e5e6a7e5..d73e7de6760 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.111 2018/02/19 00:34:32 dlg Exp $ */
+/* $OpenBSD: if_gif.c,v 1.112 2018/02/28 23:28:05 dlg Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
@@ -191,7 +191,7 @@ gif_clone_destroy(struct ifnet *ifp)
if (ISSET(ifp->if_flags, IFF_RUNNING))
gif_down(sc);
- TAILQ_INSERT_TAIL(&gif_list, &sc->sc_tunnel, t_entry);
+ TAILQ_REMOVE(&gif_list, &sc->sc_tunnel, t_entry);
NET_UNLOCK();
if_detach(ifp);
@@ -671,7 +671,7 @@ in_gif_input(struct mbuf **mp, int *offp, int proto, int af)
key.t_af = AF_INET;
key.t_src4 = ip->ip_dst;
- key.t_dst4 = ip->ip_dst;
+ key.t_dst4 = ip->ip_src;
rv = gif_input(&key, mp, offp, proto, af, ip->ip_ttl, ip->ip_tos);
if (rv == -1)