diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-04-14 20:46:32 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-04-14 20:46:32 +0000 |
commit | 14e60fde4883c2c47ca36b2f86aff14bea8edd31 (patch) | |
tree | 831d67c671284e36badecefe711a7e040eece7b0 /sys/netinet6 | |
parent | 708bc10167aa7c173466c8d11086853693f659d3 (diff) |
Pass down the address family through the pr_input calls. This
allows to simplify code used for both IPv4 and IPv6.
OK mikeb@ deraadt@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/dest6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/frag6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/icmp6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_divert.h | 3 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 5 | ||||
-rw-r--r-- | sys/netinet6/ip6_var.h | 10 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/route6.c | 4 |
8 files changed, 19 insertions, 19 deletions
diff --git a/sys/netinet6/dest6.c b/sys/netinet6/dest6.c index 05f0cc5edc7..392f1e1b106 100644 --- a/sys/netinet6/dest6.c +++ b/sys/netinet6/dest6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dest6.c,v 1.16 2017/02/05 16:04:14 jca Exp $ */ +/* $OpenBSD: dest6.c,v 1.17 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: dest6.c,v 1.25 2001/02/22 01:39:16 itojun Exp $ */ /* @@ -49,7 +49,7 @@ * Destination options header processing. */ int -dest6_input(struct mbuf **mp, int *offp, int proto) +dest6_input(struct mbuf **mp, int *offp, int proto, int af) { struct mbuf *m = *mp; int off = *offp, dstoptlen, optlen; diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 395051928f8..baaec54bab1 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frag6.c,v 1.72 2017/02/05 16:04:14 jca Exp $ */ +/* $OpenBSD: frag6.c,v 1.73 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */ /* @@ -154,7 +154,7 @@ frag6_init(void) * Fragment input */ int -frag6_input(struct mbuf **mp, int *offp, int proto) +frag6_input(struct mbuf **mp, int *offp, int proto, int af) { struct mbuf *m = *mp, *t; struct ip6_hdr *ip6; diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 215d953bf21..ae8bc54f9f6 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.204 2017/04/05 13:35:18 deraadt Exp $ */ +/* $OpenBSD: icmp6.c,v 1.205 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -378,7 +378,7 @@ icmp6_error(struct mbuf *m, int type, int code, int param) * Process a received ICMP6 message. */ int -icmp6_input(struct mbuf **mp, int *offp, int proto) +icmp6_input(struct mbuf **mp, int *offp, int proto, int af) { #if NCARP > 0 struct ifnet *ifp; diff --git a/sys/netinet6/ip6_divert.h b/sys/netinet6/ip6_divert.h index a6009214fc7..bbda15b4061 100644 --- a/sys/netinet6/ip6_divert.h +++ b/sys/netinet6/ip6_divert.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_divert.h,v 1.7 2017/03/13 20:18:21 claudio Exp $ */ +/* $OpenBSD: ip6_divert.h,v 1.8 2017/04/14 20:46:31 bluhm Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -73,7 +73,6 @@ div6stat_inc(enum div6stat_counters c) extern struct inpcbtable divb6table; void divert6_init(void); -int divert6_input(struct mbuf **, int *, int); int divert6_packet(struct mbuf *, int, u_int16_t); int divert6_sysctl(int *, u_int, void *, size_t *, void *, size_t); int divert6_usrreq(struct socket *, diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 20173d29804..88bef4f7e6f 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.182 2017/04/06 02:11:08 dhill Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.183 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -532,7 +532,8 @@ ip6_local(struct mbuf *m, int off, int nxt) goto bad; } - nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt); + nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt, + AF_INET6); } return; bad: diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 2275e76f607..32cc51978a4 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.71 2017/03/13 20:18:21 claudio Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.72 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -333,16 +333,16 @@ void ip6_randomid_init(void); u_int32_t ip6_randomid(void); void ip6_send(struct mbuf *); -int route6_input(struct mbuf **, int *, int); +int route6_input(struct mbuf **, int *, int, int); void frag6_init(void); -int frag6_input(struct mbuf **, int *, int); +int frag6_input(struct mbuf **, int *, int, int); int frag6_deletefraghdr(struct mbuf *, int); void frag6_slowtimo(void); void frag6_drain(void); void rip6_init(void); -int rip6_input(struct mbuf **mp, int *offp, int proto); +int rip6_input(struct mbuf **, int *, int, int); void rip6_ctlinput(int, struct sockaddr *, u_int, void *); int rip6_ctloutput(int, struct socket *, int, int, struct mbuf *); int rip6_output(struct mbuf *, struct socket *, struct sockaddr *, @@ -352,7 +352,7 @@ int rip6_usrreq(struct socket *, int rip6_attach(struct socket *, int); int rip6_sysctl(int *, u_int, void *, size_t *, void *, size_t); -int dest6_input(struct mbuf **, int *, int); +int dest6_input(struct mbuf **, int *, int, int); int none_input(struct mbuf **, int *, int); int in6_pcbselsrc(struct in6_addr **, struct sockaddr_in6 *, diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index e473484dae5..5f83fb937a3 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.108 2017/03/13 20:18:21 claudio Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.109 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -116,7 +116,7 @@ rip6_init(void) } int -rip6_input(struct mbuf **mp, int *offp, int proto) +rip6_input(struct mbuf **mp, int *offp, int proto, int af) { struct mbuf *m = *mp; struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); diff --git a/sys/netinet6/route6.c b/sys/netinet6/route6.c index 357fe45a78d..914059abc69 100644 --- a/sys/netinet6/route6.c +++ b/sys/netinet6/route6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route6.c,v 1.20 2017/02/05 16:04:14 jca Exp $ */ +/* $OpenBSD: route6.c,v 1.21 2017/04/14 20:46:31 bluhm Exp $ */ /* $KAME: route6.c,v 1.22 2000/12/03 00:54:00 itojun Exp $ */ /* @@ -50,7 +50,7 @@ */ int -route6_input(struct mbuf **mp, int *offp, int proto) +route6_input(struct mbuf **mp, int *offp, int proto, int af) { struct ip6_hdr *ip6; struct mbuf *m = *mp; |