Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
e6aa5087
Commit
e6aa5087
authored
Mar 04, 2011
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around lack of ARPHRD_* in bionic libc.
parent
0b64236e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
kernel_netlink.c
kernel_netlink.c
+11
-1
No files found.
kernel_netlink.c
View file @
e6aa5087
...
...
@@ -60,6 +60,11 @@ static int old_rp_filter = -1;
static
int
dgram_socket
=
-
1
;
#ifndef ARPHRD_ETHER
#define ARPHRD_ETHER 1
#define NO_ARPHRD
#endif
/* Determine an interface's hardware address, in modified EUI-64 format */
int
if_eui64
(
char
*
ifname
,
int
ifindex
,
unsigned
char
*
eui
)
...
...
@@ -82,9 +87,12 @@ if_eui64(char *ifname, int ifindex, unsigned char *eui)
switch
(
ifr
.
ifr_hwaddr
.
sa_family
)
{
case
ARPHRD_ETHER
:
#ifndef NO_ARPHRD
case
ARPHRD_FDDI
:
case
ARPHRD_IEEE802_TR
:
case
ARPHRD_IEEE802
:
{
case
ARPHRD_IEEE802
:
#endif
{
unsigned
char
*
mac
;
mac
=
(
unsigned
char
*
)
ifr
.
ifr_hwaddr
.
sa_data
;
/* Check for null address and group and global bits */
...
...
@@ -100,6 +108,7 @@ if_eui64(char *ifname, int ifindex, unsigned char *eui)
eui
[
0
]
^=
2
;
return
1
;
}
#ifndef NO_ARPHRD
case
ARPHRD_EUI64
:
case
ARPHRD_IEEE1394
:
case
ARPHRD_INFINIBAND
:
{
...
...
@@ -114,6 +123,7 @@ if_eui64(char *ifname, int ifindex, unsigned char *eui)
eui
[
0
]
^=
2
;
return
1
;
}
#endif
default:
errno
=
ENOENT
;
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment