lkml.org 
[lkml]   [2021]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] ipv4/raw: support binding to nonlocal addresses
From
On 11/17/21 5:14 PM, Riccardo Paolo Bestetti wrote:
>>> diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
>>> index 1e44a43acfe2..e540b0dcf085 100644
>>> --- a/net/ipv4/ping.c
>>> +++ b/net/ipv4/ping.c
>>> @@ -311,15 +311,11 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
>>> pr_debug("ping_check_bind_addr(sk=%p,addr=%pI4,port=%d)\n",
>>> sk, &addr->sin_addr.s_addr, ntohs(addr->sin_port));
>>>
>>> - if (addr->sin_addr.s_addr == htonl(INADDR_ANY))
>>> - chk_addr_ret = RTN_LOCAL;
>>> - else
>>> - chk_addr_ret = inet_addr_type(net, addr->sin_addr.s_addr);
>>
>> That was done intentionally in commit 0ce779a9f501
>>
>
> Should I remove this from the patch? Is there a particular reason why
> this was done in ping.c but not in the other places?
>

exactly. I did not see the big deal about changing it.

\
 
 \ /
  Last update: 2021-11-18 04:59    [W:0.110 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site