Skip to content

Commit

Permalink
rxrpc: Don't assume anything about the address in an ICMP packet
Browse files Browse the repository at this point in the history
Don't assume anything about the address in an ICMP packet in
rxrpc_error_report() as the address may not be IPv4 in future, especially
since we're just printing these details.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Jun 15, 2016
1 parent 1a70c05 commit 1c1df86
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions net/rxrpc/peer_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ void rxrpc_error_report(struct sock *sk)
struct rxrpc_local *local = sk->sk_user_data;
struct rxrpc_peer *peer;
struct sk_buff *skb;
__be32 addr;
__be16 port;

_enter("%p{%d}", sk, local->debug_id);

Expand All @@ -139,12 +137,6 @@ void rxrpc_error_report(struct sock *sk)

rxrpc_new_skb(skb);

addr = *(__be32 *)(skb_network_header(skb) + serr->addr_offset);
port = serr->port;

_net("Rx UDP Error from %pI4:%hu", &addr, ntohs(port));
_debug("Msg l:%d d:%d", skb->len, skb->data_len);

rcu_read_lock();
peer = rxrpc_lookup_peer_icmp_rcu(local, skb);
if (peer && !rxrpc_get_peer_maybe(peer))
Expand Down

0 comments on commit 1c1df86

Please sign in to comment.