Ignore null or empty interface names in EthernetTracker.
If EthernetTracker ever gets a null or empty interface name from a netlink message, it will crash the system. This likely cannot happen, but because the code runs all the time on all interfaces that have a MAC address, it seems safer to have a check for it. Test: None Flag: EXEMPT bugfix Change-Id: Iff93de9a42e5d8aa51e0183b45608c808ef31c38
This commit is contained in:
parent
0a3ed119fe
commit
28961f7464
1 changed files with 2 additions and 0 deletions
|
|
@ -287,6 +287,8 @@ public class EthernetTracker {
|
|||
// (for existing interfaces). Up until then, this code runs for every network interface
|
||||
// on the system.
|
||||
final String ifname = msg.getInterfaceName();
|
||||
if (TextUtils.isEmpty(ifname)) return; // TODO: can this happen?
|
||||
|
||||
final EthernetPort port = new EthernetPort(ifname, mac, ifinfomsg.index);
|
||||
|
||||
switch (msg.getHeader().nlmsg_type) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue