@@ -87,7 +87,7 @@ impl LinkMessageBuilder<LinkVxlan> {
8787 /// This function takes an IPv4 address
8888 /// WARNING: only one between `remote` and `group` can be present.
8989 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) )
9191 }
9292
9393 /// Adds the `group` attribute to the VXLAN
@@ -96,7 +96,7 @@ impl LinkMessageBuilder<LinkVxlan> {
9696 /// This function takes an IPv6 address
9797 /// WARNING: only one between `remote` and `group` can be present.
9898 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) )
100100 }
101101
102102 /// Adds the `remote` attribute to the VXLAN
@@ -128,15 +128,15 @@ impl LinkMessageBuilder<LinkVxlan> {
128128 /// IPADDR`, local IPADDR - specifies the source IP address to use in
129129 /// outgoing packets. This function takes an IPv4 address.
130130 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) )
132132 }
133133
134134 /// Adds the `local` attribute to the VXLAN
135135 /// This is equivalent to `ip link add name NAME type vxlan id VNI local
136136 /// IPADDR`, local IPADDR - specifies the source IP address to use in
137137 /// outgoing packets. This function takes an IPv6 address.
138138 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) )
140140 }
141141
142142 /// Adds the `tos` attribute to the VXLAN
0 commit comments