diff options
| author | Marcelo Araujo <araujo@FreeBSD.org> | 2015-12-31 02:01:20 +0000 |
|---|---|---|
| committer | Marcelo Araujo <araujo@FreeBSD.org> | 2015-12-31 02:01:20 +0000 |
| commit | 2bfd3dfb9f0cc1dcee5689351ce86434f39c50f0 (patch) | |
| tree | 43d8585e89518987c1a3a036dd3e1336d6c76e15 /sys/net/if_gre.c | |
| parent | 09df572391c107dcf26d2cbdd4008039e2c0430f (diff) | |
Notes
Diffstat (limited to 'sys/net/if_gre.c')
| -rw-r--r-- | sys/net/if_gre.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 24ed971135c2..9d4a9763ca7f 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -682,7 +682,10 @@ gre_input(struct mbuf **mp, int *offp, int proto) struct grehdr *gh; struct ifnet *ifp; struct mbuf *m; - uint32_t *opts, key; + uint32_t *opts; +#ifdef notyet + uint32_t key; +#endif uint16_t flags; int hlen, isr, af; @@ -715,17 +718,28 @@ gre_input(struct mbuf **mp, int *offp, int proto) opts++; } if (flags & GRE_FLAGS_KP) { +#ifdef notyet + /* + * XXX: The current implementation uses the key only for outgoing + * packets. But we can check the key value here, or even in the + * encapcheck function. + */ key = ntohl(*opts); +#endif hlen += sizeof(uint32_t); opts++; + } +#ifdef notyet } else key = 0; - /* + if (sc->gre_key != 0 && (key != sc->gre_key || key != 0)) goto drop; - */ +#endif if (flags & GRE_FLAGS_SP) { - /* seq = ntohl(*opts); */ +#ifdef notyet + seq = ntohl(*opts); +#endif hlen += sizeof(uint32_t); } switch (ntohs(gh->gre_proto)) { |
