]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'nexthop-route-deletye-warning'
authorDavid S. Miller <davem@davemloft.net>
Fri, 1 Apr 2022 11:09:17 +0000 (12:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Apr 2022 11:09:17 +0000 (12:09 +0100)
commitb0c07559f5048c00153cca785f52b80a2f3537e1
tree837722a430699bb426e0ddce2ae8db7fcbac03e1
parentde936dc5748b273d2381cdf928a9c4045e860c88
parentebc172b37e7465ca97fbba10cef1d3d29149dd3f
Merge branch 'nexthop-route-deletye-warning'

Nikolay Aleksandrov says:

====================
net: ipv4: fix nexthop route delete warning

The first patch fixes a warning that can be triggered by deleting a
nexthop route and specifying a device (more info in its commit msg).
And the second patch adds a selftest for that case.

Chose this way to fix it because we should match when deleting without
nh spec and should fail when deleting a nexthop route with old-style nh
spec because nexthop objects are managed separately, e.g.:
$ ip r show 1.2.3.4/32
1.2.3.4 nhid 12 via 192.168.11.2 dev dummy0

$ ip r del 1.2.3.4/32
$ ip r del 1.2.3.4/32 nhid 12
<both should work>

$ ip r del 1.2.3.4/32 dev dummy0
<should fail with ESRCH>

v2: addded more to patch 01's commit message
    adjusted the test comment in patch 02
====================

Signed-off-by: David S. Miller <davem@davemloft.net>