@@ -830,7 +830,7 @@ impl InterfaceInner {
830
830
831
831
match addr {
832
832
#[ cfg( feature = "proto-ipv4" ) ]
833
- IpAddress :: Ipv4 ( key) => key == Ipv4Address :: MULTICAST_ALL_SYSTEMS ,
833
+ IpAddress :: Ipv4 ( key) => key == IPV4_MULTICAST_ALL_SYSTEMS ,
834
834
#[ cfg( feature = "proto-rpl" ) ]
835
835
IpAddress :: Ipv6 ( Ipv6Address :: LINK_LOCAL_ALL_RPL_NODES ) => true ,
836
836
#[ cfg( feature = "proto-ipv6" ) ]
@@ -987,30 +987,35 @@ impl InterfaceInner {
987
987
}
988
988
989
989
if dst_addr. is_multicast ( ) {
990
- let b = dst_addr. as_bytes ( ) ;
991
990
let hardware_addr = match * dst_addr {
992
991
#[ cfg( feature = "proto-ipv4" ) ]
993
- IpAddress :: Ipv4 ( _addr ) => match self . caps . medium {
992
+ IpAddress :: Ipv4 ( addr ) => match self . caps . medium {
994
993
#[ cfg( feature = "medium-ethernet" ) ]
995
- Medium :: Ethernet => HardwareAddress :: Ethernet ( EthernetAddress :: from_bytes ( & [
996
- 0x01 ,
997
- 0x00 ,
998
- 0x5e ,
999
- b[ 1 ] & 0x7F ,
1000
- b[ 2 ] ,
1001
- b[ 3 ] ,
1002
- ] ) ) ,
994
+ Medium :: Ethernet => {
995
+ let b = addr. octets ( ) ;
996
+ HardwareAddress :: Ethernet ( EthernetAddress :: from_bytes ( & [
997
+ 0x01 ,
998
+ 0x00 ,
999
+ 0x5e ,
1000
+ b[ 1 ] & 0x7F ,
1001
+ b[ 2 ] ,
1002
+ b[ 3 ] ,
1003
+ ] ) )
1004
+ }
1003
1005
#[ cfg( feature = "medium-ieee802154" ) ]
1004
1006
Medium :: Ieee802154 => unreachable ! ( ) ,
1005
1007
#[ cfg( feature = "medium-ip" ) ]
1006
1008
Medium :: Ip => unreachable ! ( ) ,
1007
1009
} ,
1008
1010
#[ cfg( feature = "proto-ipv6" ) ]
1009
- IpAddress :: Ipv6 ( _addr ) => match self . caps . medium {
1011
+ IpAddress :: Ipv6 ( addr ) => match self . caps . medium {
1010
1012
#[ cfg( feature = "medium-ethernet" ) ]
1011
- Medium :: Ethernet => HardwareAddress :: Ethernet ( EthernetAddress :: from_bytes ( & [
1012
- 0x33 , 0x33 , b[ 12 ] , b[ 13 ] , b[ 14 ] , b[ 15 ] ,
1013
- ] ) ) ,
1013
+ Medium :: Ethernet => {
1014
+ let b = addr. as_bytes ( ) ;
1015
+ HardwareAddress :: Ethernet ( EthernetAddress :: from_bytes ( & [
1016
+ 0x33 , 0x33 , b[ 12 ] , b[ 13 ] , b[ 14 ] , b[ 15 ] ,
1017
+ ] ) )
1018
+ }
1014
1019
#[ cfg( feature = "medium-ieee802154" ) ]
1015
1020
Medium :: Ieee802154 => {
1016
1021
// Not sure if this is correct
0 commit comments