Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: fix wrong linkdown flag #17403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anlancs
Copy link
Contributor

@anlancs anlancs commented Nov 10, 2024

Add this one line command to one down interface (mask is 192.168.0.0/24):

ip link set dev enp2s0 up;ip route add 3.3.3.3/32 via 192.168.0.1 dev enp2s0 proto kernel onlink

Before:

K>* 3.3.3.3/32 [0/0] via 192.168.0.1, enp2s0 onlink linkdown, weight 1, 00:00:02

After:

K>* 3.3.3.3/32 [0/0] via 192.168.0.1, enp2s0 onlink, weight 1, 00:00:02

It's only display problem, just correct this linkdown flag.

Add this one line command to one down interface (mask is 192.168.0.0/24):
```
ip link set dev enp2s0 up;ip route add 3.3.3.3/32 via 192.168.0.1 dev enp2s0 proto kernel onlink
```

Before:
```
K>* 3.3.3.3/32 [0/0] via 192.168.0.1, enp2s0 onlink linkdown, weight 1, 00:00:02
```

After:
```
K>* 3.3.3.3/32 [0/0] via 192.168.0.1, enp2s0 onlink, weight 1, 00:00:02
```

It's only display problem, just correct this linkdown flag.

Signed-off-by: anlan_cs <[email protected]>
@ton31337
Copy link
Member

@Mergifyio backport stable/10.2 stable/10.1 stable/10.0 stable/9.1 stable/9.0

Copy link

mergify bot commented Nov 10, 2024

backport stable/10.2 stable/10.1 stable/10.0 stable/9.1 stable/9.0

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

@ton31337 ton31337 added this to the 10.2 milestone Nov 10, 2024
Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not being set on link up?

@anlancs
Copy link
Contributor Author

anlancs commented Nov 12, 2024

Why is this not being set on link up?

It is the time issue. If with two commands in two lines, there is no this issue. Now they are combined into one line, so the UP message of netlink comes later. @donaldsharp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants