diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-08-09 16:54:03 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-15 18:56:13 -0700 |
commit | 6e701eb914124cf260a8b9a4350740f9a7407fc7 (patch) | |
tree | af7b53f89cce64f33d54ae04266f64fb6284b1e4 /fs/9p | |
parent | e3af3d3c5b26c33a7950e34e137584f6056c4319 (diff) |
ipv4: Set ifa->ifa_dev in inet_alloc_ifa().
When a new IPv4 address is assigned via ioctl(SIOCSIFADDR),
inet_set_ifa() sets ifa->ifa_dev if it's different from in_dev
passed as an argument.
In this case, ifa is always a newly allocated object, and
ifa->ifa_dev is NULL.
inet_set_ifa() can be called for an existing reused ifa, then,
this check is always false.
Let's set ifa_dev in inet_alloc_ifa() and remove the check
in inet_set_ifa().
Now, inet_alloc_ifa() is symmetric with inet_rcu_free_ifa().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20240809235406.50187-3-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/9p')
0 files changed, 0 insertions, 0 deletions