-
Notifications
You must be signed in to change notification settings - Fork 744
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
Sittun: add Proto field #531
base: main
Are you sure you want to change the base?
Conversation
This corresponds to the `mode` parameter of the ip link command. The options are: mode { ip6ip | ipip | any } Where: - any: 0 - ip6ip: IPPROTO_IPV6 - ipip: IPPROTO_IPIP Signed-off-by: Gregory Detal <[email protected]>
Would it be possible to add a simple UT for this ? |
@@ -2674,6 +2674,7 @@ func addSittunAttrs(sittun *Sittun, linkInfo *nl.RtAttr) { | |||
data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_FLAGS, nl.Uint16Attr(sittun.EncapFlags)) | |||
data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_SPORT, htons(sittun.EncapSport)) | |||
data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_DPORT, htons(sittun.EncapDport)) | |||
data.AddRtAttr(nl.IFLA_IPTUN_PROTO, nl.Uint8Attr(sittun.Proto)) | |||
} | |||
|
|||
func parseSittunData(link Link, data []syscall.NetlinkRouteAttr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we also need to be able to read this field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gdetal Don't we need to also modify parseSittunData()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping...
This corresponds to the
mode
parameter of the ip link command.The options are:
mode { ip6ip | ipip | any }
Where:
Signed-off-by: Gregory Detal [email protected]