From: David Ahern <hidden> Date: 2018-01-25 03:45:35
IPv6 allows routes to be installed when the device is not up (admin up).
Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really
there is no reason for IPv6 to allow it, so check the flags and deny if
device is admin down.
Signed-off-by: David Ahern <redacted>
---
v3
- moved err=-ENETDOWN under the if check per Eric's request
- left the up check using dev->flags for consistency with IPv4
and that it is used more often in ipv4 and ivp6 code than
netif_running
v2
- missed setting err to -ENETDOWN (thanks for catching that Roopa)
net/ipv6/route.c | 6 ++++++
1 file changed, 6 insertions(+)
On Wed, Jan 24, 2018 at 07:45:29PM -0800, David Ahern wrote:
IPv6 allows routes to be installed when the device is not up (admin up).
Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really
there is no reason for IPv6 to allow it, so check the flags and deny if
device is admin down.
Signed-off-by: David Ahern <redacted>
On Wed, Jan 24, 2018 at 7:45 PM, David Ahern [off-list ref] wrote:
IPv6 allows routes to be installed when the device is not up (admin up).
Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really
there is no reason for IPv6 to allow it, so check the flags and deny if
device is admin down.
Signed-off-by: David Ahern <redacted>
Reviewed-by: Roopa Prabhu <redacted>
quoted hunk
---
v3
- moved err=-ENETDOWN under the if check per Eric's request
- left the up check using dev->flags for consistency with IPv4
and that it is used more often in ipv4 and ivp6 code than
netif_running
v2
- missed setting err to -ENETDOWN (thanks for catching that Roopa)
net/ipv6/route.c | 6 ++++++
1 file changed, 6 insertions(+)
From: David Miller <davem@davemloft.net> Date: 2018-01-25 21:22:26
From: David Ahern <redacted>
Date: Wed, 24 Jan 2018 19:45:29 -0800
IPv6 allows routes to be installed when the device is not up (admin up).
Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really
there is no reason for IPv6 to allow it, so check the flags and deny if
device is admin down.
Signed-off-by: David Ahern <redacted>
---
v3
- moved err=-ENETDOWN under the if check per Eric's request
- left the up check using dev->flags for consistency with IPv4
and that it is used more often in ipv4 and ivp6 code than
netif_running
v2
- missed setting err to -ENETDOWN (thanks for catching that Roopa)