[rust] Uprev eui48 to 0.4.2 from 0.4.1

Bring in fixes for unicast/multicast/universal/local check,
together with augmented unit tests.

Change-Id: I525c3806aaffb2f813591c4d59d95b939c912959
diff --git a/rustc_deps/Cargo.lock b/rustc_deps/Cargo.lock
index 3ce7018..5432dbd 100644
--- a/rustc_deps/Cargo.lock
+++ b/rustc_deps/Cargo.lock
@@ -405,7 +405,7 @@
 
 [[package]]
 name = "eui48"
-version = "0.4.1"
+version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -497,7 +497,7 @@
  "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "derp 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "eui48 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "eui48 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "font-rs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "fuchsia-async-macro 0.1.0",
@@ -2169,7 +2169,7 @@
 "checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90"
 "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
 "checksum euclid 0.19.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dbbf962bb6f877239a34491f2e0a12c6b824f389bc789eb90f1d70d4780b0727"
-"checksum eui48 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "649dadb113dc16aadb072edac675ce773a81d9aad09750b40146b7ac14a5118e"
+"checksum eui48 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ffc324d178f846c5f8524a8f0477060bac4ebe89f5d9e508af56dbe36bfa86b"
 "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
 "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
 "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
diff --git a/rustc_deps/Cargo.toml b/rustc_deps/Cargo.toml
index b42af17..27e1cb8 100644
--- a/rustc_deps/Cargo.toml
+++ b/rustc_deps/Cargo.toml
@@ -22,7 +22,7 @@
 data-encoding = "2.1.2"
 derp = "0.0.11"
 euclid = "0.19"
-eui48 = { version = "0.4.1", features = ["serde"] }
+eui48 = { version = "0.4.2", features = ["serde"] }
 failure = "0.1.1"
 font-rs = "0.1.3"
 fuchsia-async-macro = "0.1"
diff --git a/rustc_deps/vendor/eui48/.cargo-checksum.json b/rustc_deps/vendor/eui48/.cargo-checksum.json
index 75387da..551c526 100644
--- a/rustc_deps/vendor/eui48/.cargo-checksum.json
+++ b/rustc_deps/vendor/eui48/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"1b18d7c20632e974f830352d0d976d6756a8496d5b719670101653431e564f61","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"1b0b883046733d2c0b66fccbde45ee92c650598d8c25ef061b3f0d9e7853fa22","src/lib.rs":"fadd186f0c47882bf153a665eb6fca7eb58b5bfe970044051cf89da1501eb331"},"package":"649dadb113dc16aadb072edac675ce773a81d9aad09750b40146b7ac14a5118e"}
\ No newline at end of file
+{"files":{"Cargo.toml":"9decae7300b45c1bcf523f110b0e550c22353ff1ae08e6eb12e0002cd13f953f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"feb30c5003cc435b728ba6c2fcd167e2b6933ea7b522c67c039d8a65482dfb9d","src/lib.rs":"f936cb675622ccfe1448707c43f12ecc57e55c76045ea77cade14dd84de56947"},"package":"3ffc324d178f846c5f8524a8f0477060bac4ebe89f5d9e508af56dbe36bfa86b"}
\ No newline at end of file
diff --git a/rustc_deps/vendor/eui48/Cargo.toml b/rustc_deps/vendor/eui48/Cargo.toml
index 315ca1c..d19abc1 100644
--- a/rustc_deps/vendor/eui48/Cargo.toml
+++ b/rustc_deps/vendor/eui48/Cargo.toml
@@ -12,11 +12,11 @@
 
 [package]
 name = "eui48"
-version = "0.4.1"
+version = "0.4.2"
 authors = ["Andrew Baumhauer <andy@baumhauer.us>", "<rlcomstock3@github.com>", "Michal 'vorner' Vaner <vorner+github@vorner.cz>"]
 description = "A library to generate and parse IEEE EUI-48 and EUI-64, also known as MAC-48 media access\ncontrol addresses. The IEEE claims trademarks on the names EUI-48 and EUI-64, in which EUI is an\nabbreviation for Extended Unique Identifier.\n"
 homepage = "https://github.com/abaumhauer/eui48"
-documentation = "https://docs.rs/eui48/0.3.1/eui48/"
+documentation = "https://docs.rs/eui48/0.4.2/eui48/"
 readme = "README.md"
 keywords = ["EUI-48", "MAC", "MAC-48", "networking", "MACADDR"]
 license = "MIT/Apache-2.0"
diff --git a/rustc_deps/vendor/eui48/README.md b/rustc_deps/vendor/eui48/README.md
index 1279dd1..1909593 100644
--- a/rustc_deps/vendor/eui48/README.md
+++ b/rustc_deps/vendor/eui48/README.md
@@ -17,7 +17,7 @@
 ```toml
 [dependencies]
 
-eui48 = "0.4.0"
+eui48 = "0.4.2"
 ```
 
 and this to your crate root:
@@ -62,3 +62,4 @@
 - 0.3.1 Michal 'vorner' Vaner <vorner+github@vorner.cz> - Derive useful traits
 - 0.4.0 Rainer Stademann - Define ABI as repr(C)
 - 0.4.1 Andrew Baumhauer - Add IPv6 Interface ID and Link Local conversions
+- 0.4.2 Andrew Baumhauer / Eric Clone - Bug fix in is_local() and is_unicast() functions
diff --git a/rustc_deps/vendor/eui48/src/lib.rs b/rustc_deps/vendor/eui48/src/lib.rs
index f5d4df5..c6cf846 100644
--- a/rustc_deps/vendor/eui48/src/lib.rs
+++ b/rustc_deps/vendor/eui48/src/lib.rs
@@ -110,14 +110,14 @@
         self.eui.iter().all(|&b| b == 0xFF)
     }
 
-    /// Returns true if bit 1 of Y is 1 in address 'xY:xx:xx:xx:xx:xx'
+    /// Returns true if bit 1 of Y is 0 in address 'xY:xx:xx:xx:xx:xx'
     pub fn is_unicast(&self) -> bool {
-        self.eui[0] & 0 == 0
+        self.eui[0] & 1 == 0
     }
 
     /// Returns true if bit 1 of Y is 1 in address 'xY:xx:xx:xx:xx:xx'
     pub fn is_multicast(&self) -> bool {
-        self.eui[0] & 1 != 0
+        self.eui[0] & 1 == 1
     }
 
     /// Returns true if bit 2 of Y is 0 in address 'xY:xx:xx:xx:xx:xx'
@@ -127,7 +127,7 @@
 
     /// Returns true if bit 2 of Y is 1 in address 'xY:xx:xx:xx:xx:xx'
     pub fn is_local(&self) -> bool {
-        self.eui[0] & 1 << 1 != 0
+        self.eui[0] & 1 << 1 == 2
     }
 
     /// Returns a String representation in the format '00-00-00-00-00-00'
@@ -409,28 +409,44 @@
 
     #[test]
     fn test_is_unicast() {
-        let mac = MacAddress::parse_str("FE:00:5E:AB:CD:EF").unwrap();
-        assert!(mac.is_unicast());
+        let mac_u = MacAddress::parse_str("FE:00:5E:AB:CD:EF").unwrap();
+        let mac_m = MacAddress::parse_str("01:00:5E:AB:CD:EF").unwrap();
+        assert!(mac_u.is_unicast());
+        assert!(!mac_m.is_unicast());
+        assert_eq!("fe:00:5e:ab:cd:ef", mac_u.to_hex_string()); // Catch modifying first octet
+        let mac = MacAddress::parse_str("FF:00:5E:AB:CD:EF").unwrap();
+        assert!(!mac.is_unicast());
+        assert_eq!("ff:00:5e:ab:cd:ef", mac.to_hex_string()); // Catch modifying first octet
         assert!(MacAddress::nil().is_unicast());
+        assert!(!MacAddress::broadcast().is_unicast());
     }
 
     #[test]
     fn test_is_multicast() {
-        let mac = MacAddress::parse_str("01:00:5E:AB:CD:EF").unwrap();
-        assert!(mac.is_multicast());
+        let mac_u = MacAddress::parse_str("FE:00:5E:AB:CD:EF").unwrap();
+        let mac_m = MacAddress::parse_str("01:00:5E:AB:CD:EF").unwrap();
+        assert!(!mac_u.is_multicast());
+        assert!(mac_m.is_multicast());
+        assert!(!MacAddress::nil().is_multicast());
+        assert_eq!("01:00:5e:ab:cd:ef", mac_m.to_hex_string()); // Catch modifying first octet
+        let mac = MacAddress::parse_str("F0:00:5E:AB:CD:EF").unwrap();
+        assert!(!mac.is_multicast());
+        assert_eq!("f0:00:5e:ab:cd:ef", mac.to_hex_string()); // Catch modifying first octet
         assert!(MacAddress::broadcast().is_multicast());
     }
 
     #[test]
     fn test_is_universal() {
-        let mac = MacAddress::parse_str("15:24:56:AB:CD:EF").unwrap();
+        let mac = MacAddress::parse_str("11:24:56:AB:CD:EF").unwrap();
         assert!(mac.is_universal());
+        assert_eq!("11:24:56:ab:cd:ef", mac.to_hex_string()); // Catch modifying first octet
     }
 
     #[test]
     fn test_is_local() {
-        let mac = MacAddress::parse_str("16:34:56:AB:CD:EF").unwrap();
+        let mac = MacAddress::parse_str("06:34:56:AB:CD:EF").unwrap();
         assert!(mac.is_local());
+        assert_eq!("06:34:56:ab:cd:ef", mac.to_hex_string()); // Catch modifying first octet
     }
 
     #[test]