diff options
| author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-10-21 11:32:31 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2024-10-29 11:54:57 +0100 |
| commit | abd0deff03d854cb34818e1e01490296d0314ea1 (patch) | |
| tree | 92a204ad421c44780c4140b2c53d8f44df617863 /net/lapb | |
| parent | 2d34429d14f9d09b38a8bee6a972a07228378df6 (diff) | |
ipv4: Don't allocate ifa for 0.0.0.0 in inet_rtm_newaddr().
When we pass 0.0.0.0 to __inet_insert_ifa(), it frees ifa and returns 0.
We can do this check much earlier for RTM_NEWADDR even before allocating
struct in_ifaddr.
Let's move the validation to
1. inet_insert_ifa() for ioctl()
2. inet_rtm_newaddr() for RTM_NEWADDR
Now, we can remove the same check in find_matching_ifa().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions
