Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
dfd982ba
Commit
dfd982ba
authored
Apr 10, 2008
by
YOSHIFUJI Hideaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6] ADDRCONF: Uninline ipv6_isatap_eui64().
Signed-off-by:
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
parent
3eb84f49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
+25
-16
include/net/addrconf.h
include/net/addrconf.h
+1
-14
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+24
-2
No files found.
include/net/addrconf.h
View file @
dfd982ba
...
@@ -233,20 +233,7 @@ static inline int ipv6_addr_is_ll_all_routers(const struct in6_addr *addr)
...
@@ -233,20 +233,7 @@ static inline int ipv6_addr_is_ll_all_routers(const struct in6_addr *addr)
(
addr
->
s6_addr32
[
3
]
^
htonl
(
0x00000002
)))
==
0
);
(
addr
->
s6_addr32
[
3
]
^
htonl
(
0x00000002
)))
==
0
);
}
}
static
inline
int
ipv6_isatap_eui64
(
u8
*
eui
,
__be32
addr
)
extern
int
__ipv6_isatap_ifid
(
u8
*
eui
,
__be32
addr
);
{
eui
[
0
]
=
(
ipv4_is_zeronet
(
addr
)
||
ipv4_is_private_10
(
addr
)
||
ipv4_is_loopback
(
addr
)
||
ipv4_is_linklocal_169
(
addr
)
||
ipv4_is_private_172
(
addr
)
||
ipv4_is_test_192
(
addr
)
||
ipv4_is_anycast_6to4
(
addr
)
||
ipv4_is_private_192
(
addr
)
||
ipv4_is_test_198
(
addr
)
||
ipv4_is_multicast
(
addr
)
||
ipv4_is_lbcast
(
addr
))
?
0x00
:
0x02
;
eui
[
1
]
=
0
;
eui
[
2
]
=
0x5E
;
eui
[
3
]
=
0xFE
;
memcpy
(
eui
+
4
,
&
addr
,
4
);
return
0
;
}
static
inline
int
ipv6_addr_is_isatap
(
const
struct
in6_addr
*
addr
)
static
inline
int
ipv6_addr_is_isatap
(
const
struct
in6_addr
*
addr
)
{
{
...
...
net/ipv6/addrconf.c
View file @
dfd982ba
...
@@ -1494,6 +1494,29 @@ static int addrconf_ifid_infiniband(u8 *eui, struct net_device *dev)
...
@@ -1494,6 +1494,29 @@ static int addrconf_ifid_infiniband(u8 *eui, struct net_device *dev)
return
0
;
return
0
;
}
}
int
__ipv6_isatap_ifid
(
u8
*
eui
,
__be32
addr
)
{
eui
[
0
]
=
(
ipv4_is_zeronet
(
addr
)
||
ipv4_is_private_10
(
addr
)
||
ipv4_is_loopback
(
addr
)
||
ipv4_is_linklocal_169
(
addr
)
||
ipv4_is_private_172
(
addr
)
||
ipv4_is_test_192
(
addr
)
||
ipv4_is_anycast_6to4
(
addr
)
||
ipv4_is_private_192
(
addr
)
||
ipv4_is_test_198
(
addr
)
||
ipv4_is_multicast
(
addr
)
||
ipv4_is_lbcast
(
addr
))
?
0x00
:
0x02
;
eui
[
1
]
=
0
;
eui
[
2
]
=
0x5E
;
eui
[
3
]
=
0xFE
;
memcpy
(
eui
+
4
,
&
addr
,
4
);
return
0
;
}
EXPORT_SYMBOL
(
__ipv6_isatap_ifid
);
static
int
addrconf_ifid_sit
(
u8
*
eui
,
struct
net_device
*
dev
)
{
if
(
dev
->
priv_flags
&
IFF_ISATAP
)
return
__ipv6_isatap_ifid
(
eui
,
*
(
__be32
*
)
dev
->
dev_addr
);
return
-
1
;
}
static
int
ipv6_generate_eui64
(
u8
*
eui
,
struct
net_device
*
dev
)
static
int
ipv6_generate_eui64
(
u8
*
eui
,
struct
net_device
*
dev
)
{
{
switch
(
dev
->
type
)
{
switch
(
dev
->
type
)
{
...
@@ -1506,8 +1529,7 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
...
@@ -1506,8 +1529,7 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
case
ARPHRD_INFINIBAND
:
case
ARPHRD_INFINIBAND
:
return
addrconf_ifid_infiniband
(
eui
,
dev
);
return
addrconf_ifid_infiniband
(
eui
,
dev
);
case
ARPHRD_SIT
:
case
ARPHRD_SIT
:
if
(
dev
->
priv_flags
&
IFF_ISATAP
)
return
addrconf_ifid_sit
(
eui
,
dev
);
return
ipv6_isatap_eui64
(
eui
,
*
(
__be32
*
)
dev
->
dev_addr
);
}
}
return
-
1
;
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