ip6_savecontrol() argument is redundant
This commit is contained in:
parent
1410779a4f
commit
11de19f44d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121674
@ -458,7 +458,7 @@ udp_append(last, ip, n, off)
|
||||
}
|
||||
savedflags = last->inp_flags;
|
||||
last->inp_flags &= ~INP_UNMAPPABLEOPTS;
|
||||
ip6_savecontrol(last, &opts, &udp_ip6.uip6_ip6, n);
|
||||
ip6_savecontrol(last, n, &opts);
|
||||
last->inp_flags = savedflags;
|
||||
} else
|
||||
#endif
|
||||
|
@ -1944,7 +1944,7 @@ icmp6_rip6_input(mp, off)
|
||||
struct mbuf *n;
|
||||
if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) {
|
||||
if (last->in6p_flags & IN6P_CONTROLOPTS)
|
||||
ip6_savecontrol(last, &opts, ip6, n);
|
||||
ip6_savecontrol(last, n, &opts);
|
||||
/* strip intermediate headers */
|
||||
m_adj(n, off);
|
||||
if (sbappendaddr(&last->in6p_socket->so_rcv,
|
||||
@ -1964,7 +1964,7 @@ icmp6_rip6_input(mp, off)
|
||||
}
|
||||
if (last) {
|
||||
if (last->in6p_flags & IN6P_CONTROLOPTS)
|
||||
ip6_savecontrol(last, &opts, ip6, m);
|
||||
ip6_savecontrol(last, m, &opts);
|
||||
/* strip intermediate headers */
|
||||
m_adj(m, off);
|
||||
if (sbappendaddr(&last->in6p_socket->so_rcv,
|
||||
|
@ -1055,15 +1055,14 @@ ip6_unknown_opt(optp, m, off)
|
||||
* very first mbuf on the mbuf chain.
|
||||
*/
|
||||
void
|
||||
ip6_savecontrol(in6p, mp, ip6, m)
|
||||
ip6_savecontrol(in6p, m, mp)
|
||||
struct inpcb *in6p;
|
||||
struct mbuf **mp;
|
||||
struct ip6_hdr *ip6;
|
||||
struct mbuf *m;
|
||||
struct mbuf *m, **mp;
|
||||
{
|
||||
#define IS2292(x, y) ((in6p->in6p_flags & IN6P_RFC2292) ? (x) : (y))
|
||||
struct thread *td = curthread; /* XXX */
|
||||
int privileged = 0;
|
||||
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
|
||||
|
||||
if (td && !suser(td))
|
||||
privileged++;
|
||||
|
@ -352,8 +352,7 @@ void ip6_delaux __P((struct mbuf *));
|
||||
int ip6_mforward __P((struct ip6_hdr *, struct ifnet *, struct mbuf *));
|
||||
int ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
|
||||
u_int32_t *));
|
||||
void ip6_savecontrol __P((struct inpcb *, struct mbuf **, struct ip6_hdr *,
|
||||
struct mbuf *));
|
||||
void ip6_savecontrol __P((struct inpcb *, struct mbuf *, struct mbuf **));
|
||||
void ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *,
|
||||
u_int32_t *));
|
||||
int ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
|
||||
|
@ -198,7 +198,7 @@ rip6_input(mp, offp, proto)
|
||||
if (n) {
|
||||
if (last->in6p_flags & IN6P_CONTROLOPTS ||
|
||||
last->in6p_socket->so_options & SO_TIMESTAMP)
|
||||
ip6_savecontrol(last, &opts, ip6, n);
|
||||
ip6_savecontrol(last, n, &opts);
|
||||
/* strip intermediate headers */
|
||||
m_adj(n, *offp);
|
||||
if (sbappendaddr(&last->in6p_socket->so_rcv,
|
||||
@ -239,7 +239,7 @@ rip6_input(mp, offp, proto)
|
||||
if (last) {
|
||||
if (last->in6p_flags & IN6P_CONTROLOPTS ||
|
||||
last->in6p_socket->so_options & SO_TIMESTAMP)
|
||||
ip6_savecontrol(last, &opts, ip6, m);
|
||||
ip6_savecontrol(last, m, &opts);
|
||||
/* strip intermediate headers */
|
||||
m_adj(m, *offp);
|
||||
if (sbappendaddr(&last->in6p_socket->so_rcv,
|
||||
|
@ -284,8 +284,7 @@ udp6_input(mp, offp, proto)
|
||||
*/
|
||||
if (last->in6p_flags & IN6P_CONTROLOPTS
|
||||
|| last->in6p_socket->so_options & SO_TIMESTAMP)
|
||||
ip6_savecontrol(last, &opts,
|
||||
ip6, n);
|
||||
ip6_savecontrol(last, n, &opts);
|
||||
|
||||
m_adj(n, off + sizeof(struct udphdr));
|
||||
if (sbappendaddr(&last->in6p_socket->so_rcv,
|
||||
@ -343,7 +342,7 @@ udp6_input(mp, offp, proto)
|
||||
#endif /* FAST_IPSEC */
|
||||
if (last->in6p_flags & IN6P_CONTROLOPTS
|
||||
|| last->in6p_socket->so_options & SO_TIMESTAMP)
|
||||
ip6_savecontrol(last, &opts, ip6, m);
|
||||
ip6_savecontrol(last, m, &opts);
|
||||
|
||||
m_adj(m, off + sizeof(struct udphdr));
|
||||
if (sbappendaddr(&last->in6p_socket->so_rcv,
|
||||
@ -406,7 +405,7 @@ udp6_input(mp, offp, proto)
|
||||
udp_in6.sin6_port = uh->uh_sport;
|
||||
if (in6p->in6p_flags & IN6P_CONTROLOPTS
|
||||
|| in6p->in6p_socket->so_options & SO_TIMESTAMP)
|
||||
ip6_savecontrol(in6p, &opts, ip6, m);
|
||||
ip6_savecontrol(in6p, m, &opts);
|
||||
m_adj(m, off + sizeof(struct udphdr));
|
||||
if (sbappendaddr(&in6p->in6p_socket->so_rcv,
|
||||
(struct sockaddr *)&udp_in6,
|
||||
|
Loading…
Reference in New Issue
Block a user