@@ -87,7 +87,7 @@ impl LinkMessageBuilder<LinkVxlan> {
87
87
/// This function takes an IPv4 address
88
88
/// WARNING: only one between `remote` and `group` can be present.
89
89
pub fn group ( self , addr : std:: net:: Ipv4Addr ) -> Self {
90
- self . append_info_data ( InfoVxlan :: Group ( addr. octets ( ) . to_vec ( ) ) )
90
+ self . append_info_data ( InfoVxlan :: Group ( addr) )
91
91
}
92
92
93
93
/// Adds the `group` attribute to the VXLAN
@@ -96,7 +96,7 @@ impl LinkMessageBuilder<LinkVxlan> {
96
96
/// This function takes an IPv6 address
97
97
/// WARNING: only one between `remote` and `group` can be present.
98
98
pub fn group6 ( self , addr : std:: net:: Ipv6Addr ) -> Self {
99
- self . append_info_data ( InfoVxlan :: Group6 ( addr. octets ( ) . to_vec ( ) ) )
99
+ self . append_info_data ( InfoVxlan :: Group6 ( addr) )
100
100
}
101
101
102
102
/// Adds the `remote` attribute to the VXLAN
@@ -128,15 +128,15 @@ impl LinkMessageBuilder<LinkVxlan> {
128
128
/// IPADDR`, local IPADDR - specifies the source IP address to use in
129
129
/// outgoing packets. This function takes an IPv4 address.
130
130
pub fn local ( self , addr : std:: net:: Ipv4Addr ) -> Self {
131
- self . append_info_data ( InfoVxlan :: Local ( addr. octets ( ) . to_vec ( ) ) )
131
+ self . append_info_data ( InfoVxlan :: Local ( addr) )
132
132
}
133
133
134
134
/// Adds the `local` attribute to the VXLAN
135
135
/// This is equivalent to `ip link add name NAME type vxlan id VNI local
136
136
/// IPADDR`, local IPADDR - specifies the source IP address to use in
137
137
/// outgoing packets. This function takes an IPv6 address.
138
138
pub fn local6 ( self , addr : std:: net:: Ipv6Addr ) -> Self {
139
- self . append_info_data ( InfoVxlan :: Local6 ( addr. octets ( ) . to_vec ( ) ) )
139
+ self . append_info_data ( InfoVxlan :: Local6 ( addr) )
140
140
}
141
141
142
142
/// Adds the `tos` attribute to the VXLAN
0 commit comments