* question about __udp6_lib_err usage of __udp6_lib_lookup
@ 2013-09-05 2:44 Dave Jones
2013-09-05 3:21 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2013-09-05 2:44 UTC (permalink / raw)
To: netdev
__udp6_lib_lookup's prototype is ...
struct sock *__udp6_lib_lookup(struct net *net,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif, struct udp_table *udptable)
But the usage in __udp6_lib_err is...
521 sk = __udp6_lib_lookup(dev_net(skb->dev), daddr, uh->dest,
522 saddr, uh->source, inet6_iif(skb), udptable);
With the source/dest addr/port arguments swapped. Is this intentional ?
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question about __udp6_lib_err usage of __udp6_lib_lookup
2013-09-05 2:44 question about __udp6_lib_err usage of __udp6_lib_lookup Dave Jones
@ 2013-09-05 3:21 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-09-05 3:21 UTC (permalink / raw)
To: davej; +Cc: netdev
From: Dave Jones <davej@redhat.com>
Date: Wed, 4 Sep 2013 22:44:34 -0400
> __udp6_lib_lookup's prototype is ...
>
> struct sock *__udp6_lib_lookup(struct net *net,
> const struct in6_addr *saddr, __be16 sport,
> const struct in6_addr *daddr, __be16 dport,
> int dif, struct udp_table *udptable)
>
> But the usage in __udp6_lib_err is...
>
> 521 sk = __udp6_lib_lookup(dev_net(skb->dev), daddr, uh->dest,
> 522 saddr, uh->source, inet6_iif(skb), udptable);
>
> With the source/dest addr/port arguments swapped. Is this intentional ?
Yes, because we are looking at the headers of a packet we transmitted,
quoted in an ICMP response.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-05 3:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 2:44 question about __udp6_lib_err usage of __udp6_lib_lookup Dave Jones
2013-09-05 3:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox