[Asterisk-code-review] utils.c: Fix ast set default eid for multiple platforms (asterisk[13])

George Joseph asteriskteam at digium.com
Sun Oct 16 18:35:21 CDT 2016


Hello Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/4116

to look at the new patch set (#2).

Change subject: utils.c:  Fix ast_set_default_eid for multiple platforms
......................................................................

utils.c:  Fix ast_set_default_eid for multiple platforms

ast_set_default_eid was searching for ethX, emX, enoX, ensX and even
pciD#U interface names.  While this was a good attempt, it wasn't
inclusive enough to capture interfaces like enp6s0 or ens6d1, etc.

Rather than relying on interface names, we now simply find the first
interface returned by the OS that has a hardware address and that
address isn't all 0x00 or all 0xff.  The code IS different for BSD,
Solaris and Linux based on what method is available for enumerating
interfaces.

Tested on:
FreeBSD9
CentOS6
Ubuntu14
Fedora24

I was unable to test on Solaris at this time but the code for Solaris
is used elsewhere at Digium.

Change-Id: Iaa6db87ca78a9a375e47d70e043ae08c1448cb72
---
M main/utils.c
1 file changed, 203 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/16/4116/2
-- 
To view, visit https://gerrit.asterisk.org/4116
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iaa6db87ca78a9a375e47d70e043ae08c1448cb72
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019



More information about the asterisk-code-review mailing list