aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorSoheil Hassas Yeganeh <soheil@google.com>2016-11-30 14:01:08 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-02 10:55:39 -0500
commit83a1a1a70e87f676fbb6086b26b6ac7f7fdd107d (patch)
tree3e7c0360a53899abcb4e850e8fa96476cbb944e9 /include/linux/filter.h
parentMerge branch 'lwt-bpf' (diff)
downloadlinux-dev-83a1a1a70e87f676fbb6086b26b6ac7f7fdd107d.tar.xz
linux-dev-83a1a1a70e87f676fbb6086b26b6ac7f7fdd107d.zip
sock: reset sk_err for ICMP packets read from error queue
Only when ICMP packets are enqueued onto the error queue, sk_err is also set. Before f5f99309fa74 (sock: do not set sk_err in sock_dequeue_err_skb), a subsequent error queue read would set sk_err to the next error on the queue, or 0 if empty. As no error types other than ICMP set this field, sk_err should not be modified upon dequeuing them. Only for ICMP errors, reset the (racy) sk_err. Some applications, like traceroute, rely on it and go into a futile busy POLLERR loop otherwise. In principle, sk_err has to be set while an ICMP error is queued. Testing is_icmp_err_skb(skb_next) approximates this without requiring a full queue walk. Applications that receive both ICMP and other errors cannot rely on this legacy behavior, as other errors do not set sk_err in the first place. Fixes: f5f99309fa74 (sock: do not set sk_err in sock_dequeue_err_skb) Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Acked-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/filter.h')
0 files changed, 0 insertions, 0 deletions