Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Linux: set broadcast flag by default for ipvlan interfaces.#33

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ido wants to merge3 commits intomaster
base:master
Choose a base branch
Loading
fromWIP-issue32-ipvlan

Conversation

@ido
Copy link
Member

@idoido commentedApr 23, 2021
edited
Loading

The patch uses ethtool'sSIOCETHTOOLioctl to obtain the driver name of the interface, and turns on the broadcast flag by default when it detects anipvlan interface. This does not yet differentiate between L2, L3, or L3S mode.

@rsmarples we can use thisethtool method to detect most other device types, likebridge andtuntap, without reading/sys. I might refactor those after this is cleaned up.

TODO:

  • Modify DHCP IAID so thatipvlan interfaces do not generate an IAID conflict:ipvlan0: IAID conflicts with one assigned to eth0
  • Clean up patch before merging.

Fixes#32

@idoido requested a review fromrsmarplesApril 23, 2021 10:04
@idoido self-assigned thisApr 23, 2021
@idoido marked this pull request as ready for reviewApril 23, 2021 10:08
@idoido marked this pull request as draftApril 23, 2021 10:11
Copy link
Member

@rsmarplesrsmarples left a comment

Choose a reason for hiding this comment

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

Mainly comments on style.
Otherwise looks good!

@deliciouslytyped
Copy link

Please remember to change the documentation as well!

ido and rsmarples reacted with thumbs up emoji

@ido
Copy link
MemberAuthor

ido commentedApr 25, 2021

I squashed the commits into one patch. So far, this sets broadcast. I might have a solution for setting unique IAIDs soon.

Linux ipvlan interfaces share a MAC address with their siblings andparent physical interface.  Before they are assigned an IP address,these virtual interfaces do not receive DHCP OFFER unicast messagesbecause the ipvlan driver does not know to pass them to the virtualinterface yet by IP.  This chicken-and-egg problem is resolved withtwo changes:In this patch, we set the broadcast flag for an interface if itbelongs to the ipvlan driver, as detected via SIOCETHTOOL ETHTOOL_GDRVINFO.(closes#32)A forthcoming patch will automatically modify the DHCP IAID foripvlan interfaces so that they do not conflict with the parent(lower/physical) interface IAID.  For now, dhcpcd will display a warninglog message when conflicting IAID (same MAC address) interfaces are active.(A minor grammar correction is included free of charge.)
Differentiate between ioctl error and zero-length driver name in if_get_driver.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rsmarplesrsmarplesrsmarples requested changes

Assignees

@idoido

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Automatically enable requesting broadcast reply onipvlan

4 participants

@ido@deliciouslytyped@rsmarples

[8]ページ先頭

©2009-2025 Movatter.jp