Bug 201071

Summary: Creating a vxlan in state 'up' does not give proper RTM_NEWLINK message
Product: Networking Reporter: liam.mcbirnie
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: NEW ---    
Severity: normal CC: roopa
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.19-rc1 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: patch to fix notification on newlink with IFF_UP

Description liam.mcbirnie 2018-09-10 04:04:37 UTC
If a vxlan is created with state 'up', the RTM_NEWLINK message shows the state as down, and there no other netlink messages are sent.
As a result, processes listening to netlink are never notified that the vxlan link is up.

eg.
# ip link add test up type vxlan id 8 group 224.224.224.224 dev eth0

Output of ip monitor link
# 4: test: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default
      link/ether ee:cd:97:1a:cf:91 brd ff:ff:ff:ff:ff:ff

Output of ip link show (expected from netlink message)
# 4: test: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1000
      link/ether ee:cd:97:1a:cf:91 brd ff:ff:ff:ff:ff:ff

This is a regression introduced by the following patch series.
https://patchwork.ozlabs.org/patch/947181/
Comment 1 Roopa Prabhu 2018-09-12 04:44:38 UTC
Created attachment 278465 [details]
patch to fix notification on newlink with IFF_UP

Can you please try the attached patch ?. thank you.
Comment 2 liam.mcbirnie 2018-09-12 07:57:39 UTC
Your patch works.
Thanks.