Date: Wed, 17 Dec 2008 13:00:18 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186223 - in head/sys: netinet netinet6 Message-ID: <200812171300.mBHD0I8o004666@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Wed Dec 17 13:00:18 2008 New Revision: 186223 URL: http://svn.freebsd.org/changeset/base/186223 Log: Another step assimilating IPv[46] PCB code: normalize IN6P_* compat flags usage to their equialent INP_* counterpart. Discussed with: rwatson Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/netinet/in_pcb.h head/sys/netinet6/icmp6.c head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed Dec 17 12:52:34 2008 (r186222) +++ head/sys/netinet/in_pcb.h Wed Dec 17 13:00:18 2008 (r186223) @@ -441,7 +441,7 @@ void inp_4tuple_get(struct inpcb *inp, #define IN6P_RECVIF INP_RECVIF #define IN6P_MTUDISC INP_MTUDISC #define IN6P_FAITH INP_FAITH -#define IN6P_CONTROLOPTS INP_CONTROLOPTS +#define IN6P_CONTROLOPTS INP_CONTROLOPTS /* * socket AF version is {newer than,or include} * actual datagram AF version Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Wed Dec 17 12:52:34 2008 (r186222) +++ head/sys/netinet6/icmp6.c Wed Dec 17 13:00:18 2008 (r186223) @@ -1983,7 +1983,7 @@ icmp6_rip6_input(struct mbuf **mp, int o } if (n != NULL || (n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { - if (last->inp_flags & IN6P_CONTROLOPTS) + if (last->inp_flags & INP_CONTROLOPTS) ip6_savecontrol(last, n, &opts); /* strip intermediate headers */ m_adj(n, off); @@ -2009,7 +2009,7 @@ icmp6_rip6_input(struct mbuf **mp, int o } INP_INFO_RUNLOCK(&V_ripcbinfo); if (last != NULL) { - if (last->inp_flags & IN6P_CONTROLOPTS) + if (last->inp_flags & INP_CONTROLOPTS) ip6_savecontrol(last, m, &opts); /* strip intermediate headers */ m_adj(m, off); Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Dec 17 12:52:34 2008 (r186222) +++ head/sys/netinet6/ip6_output.c Wed Dec 17 13:00:18 2008 (r186223) @@ -1558,7 +1558,7 @@ do { \ break; case IPV6_FAITH: - OPTSET(IN6P_FAITH); + OPTSET(INP_FAITH); break; case IPV6_RECVPATHMTU: @@ -1768,18 +1768,18 @@ do { \ switch (optval) { case IPV6_PORTRANGE_DEFAULT: - in6p->inp_flags &= ~(IN6P_LOWPORT); - in6p->inp_flags &= ~(IN6P_HIGHPORT); + in6p->inp_flags &= ~(INP_LOWPORT); + in6p->inp_flags &= ~(INP_HIGHPORT); break; case IPV6_PORTRANGE_HIGH: - in6p->inp_flags &= ~(IN6P_LOWPORT); - in6p->inp_flags |= IN6P_HIGHPORT; + in6p->inp_flags &= ~(INP_LOWPORT); + in6p->inp_flags |= INP_HIGHPORT; break; case IPV6_PORTRANGE_LOW: - in6p->inp_flags &= ~(IN6P_HIGHPORT); - in6p->inp_flags |= IN6P_LOWPORT; + in6p->inp_flags &= ~(INP_HIGHPORT); + in6p->inp_flags |= INP_LOWPORT; break; default: @@ -1881,7 +1881,7 @@ do { \ break; case IPV6_FAITH: - optval = OPTBIT(IN6P_FAITH); + optval = OPTBIT(INP_FAITH); break; case IPV6_V6ONLY: @@ -1892,9 +1892,9 @@ do { \ { int flags; flags = in6p->inp_flags; - if (flags & IN6P_HIGHPORT) + if (flags & INP_HIGHPORT) optval = IPV6_PORTRANGE_HIGH; - else if (flags & IN6P_LOWPORT) + else if (flags & INP_LOWPORT) optval = IPV6_PORTRANGE_LOW; else optval = 0; Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Wed Dec 17 12:52:34 2008 (r186222) +++ head/sys/netinet6/raw_ip6.c Wed Dec 17 13:00:18 2008 (r186223) @@ -207,7 +207,7 @@ rip6_input(struct mbuf **mp, int *offp, } else #endif /* IPSEC */ if (n) { - if (last->inp_flags & IN6P_CONTROLOPTS || + if (last->inp_flags & INP_CONTROLOPTS || last->inp_socket->so_options & SO_TIMESTAMP) ip6_savecontrol(last, n, &opts); /* strip intermediate headers */ @@ -241,7 +241,7 @@ rip6_input(struct mbuf **mp, int *offp, } else #endif /* IPSEC */ if (last != NULL) { - if (last->inp_flags & IN6P_CONTROLOPTS || + if (last->inp_flags & INP_CONTROLOPTS || last->inp_socket->so_options & SO_TIMESTAMP) ip6_savecontrol(last, m, &opts); /* Strip intermediate headers. */ Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Wed Dec 17 12:52:34 2008 (r186222) +++ head/sys/netinet6/udp6_usrreq.c Wed Dec 17 13:00:18 2008 (r186223) @@ -153,7 +153,7 @@ udp6_append(struct inpcb *inp, struct mb } #endif opts = NULL; - if (inp->inp_flags & IN6P_CONTROLOPTS || + if (inp->inp_flags & INP_CONTROLOPTS || inp->inp_socket->so_options & SO_TIMESTAMP) ip6_savecontrol(inp, n, &opts); m_adj(n, off + sizeof(struct udphdr));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812171300.mBHD0I8o004666>