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
Kirill Smelkov
linux
Commits
7f2c2754
Commit
7f2c2754
authored
Mar 19, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Undo __constant_{n,h}to{n,h}l from anycast patch.
parent
db08df95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+15
-15
No files found.
net/ipv6/addrconf.c
View file @
7f2c2754
...
@@ -179,10 +179,10 @@ int ipv6_addr_type(struct in6_addr *addr)
...
@@ -179,10 +179,10 @@ int ipv6_addr_type(struct in6_addr *addr)
st
=
addr
->
s6_addr32
[
0
];
st
=
addr
->
s6_addr32
[
0
];
if
((
st
&
__constant_htonl
(
0xFF000000
))
==
__constant_
htonl
(
0xFF000000
))
{
if
((
st
&
htonl
(
0xFF000000
))
==
htonl
(
0xFF000000
))
{
type
=
IPV6_ADDR_MULTICAST
;
type
=
IPV6_ADDR_MULTICAST
;
switch
((
st
&
__constant_
htonl
(
0x00FF0000
)))
{
switch
((
st
&
htonl
(
0x00FF0000
)))
{
case
__constant_htonl
(
0x00010000
):
case
__constant_htonl
(
0x00010000
):
type
|=
IPV6_ADDR_LOOPBACK
;
type
|=
IPV6_ADDR_LOOPBACK
;
break
;
break
;
...
@@ -199,9 +199,9 @@ int ipv6_addr_type(struct in6_addr *addr)
...
@@ -199,9 +199,9 @@ int ipv6_addr_type(struct in6_addr *addr)
}
}
/* check for reserved anycast addresses */
/* check for reserved anycast addresses */
if
((
st
&
__constant_
htonl
(
0xE0000000
))
&&
if
((
st
&
htonl
(
0xE0000000
))
&&
((
addr
->
s6_addr32
[
2
]
==
__constant_
htonl
(
0xFDFFFFFF
)
&&
((
addr
->
s6_addr32
[
2
]
==
htonl
(
0xFDFFFFFF
)
&&
(
addr
->
s6_addr32
[
3
]
|
__constant_
htonl
(
0x7F
))
==
(
u32
)
~
0
)
||
(
addr
->
s6_addr32
[
3
]
|
htonl
(
0x7F
))
==
(
u32
)
~
0
)
||
(
addr
->
s6_addr32
[
2
]
==
0
&&
addr
->
s6_addr32
[
3
]
==
0
)))
(
addr
->
s6_addr32
[
2
]
==
0
&&
addr
->
s6_addr32
[
3
]
==
0
)))
type
=
IPV6_ADDR_ANYCAST
;
type
=
IPV6_ADDR_ANYCAST
;
else
else
...
@@ -210,14 +210,14 @@ int ipv6_addr_type(struct in6_addr *addr)
...
@@ -210,14 +210,14 @@ int ipv6_addr_type(struct in6_addr *addr)
/* Consider all addresses with the first three bits different of
/* Consider all addresses with the first three bits different of
000 and 111 as finished.
000 and 111 as finished.
*/
*/
if
((
st
&
__constant_htonl
(
0xE0000000
))
!=
__constant_
htonl
(
0x00000000
)
&&
if
((
st
&
htonl
(
0xE0000000
))
!=
htonl
(
0x00000000
)
&&
(
st
&
__constant_htonl
(
0xE0000000
))
!=
__constant_
htonl
(
0xE0000000
))
(
st
&
htonl
(
0xE0000000
))
!=
htonl
(
0xE0000000
))
return
type
;
return
type
;
if
((
st
&
__constant_htonl
(
0xFFC00000
))
==
__constant_
htonl
(
0xFE800000
))
if
((
st
&
htonl
(
0xFFC00000
))
==
htonl
(
0xFE800000
))
return
(
IPV6_ADDR_LINKLOCAL
|
type
);
return
(
IPV6_ADDR_LINKLOCAL
|
type
);
if
((
st
&
__constant_htonl
(
0xFFC00000
))
==
__constant_
htonl
(
0xFEC00000
))
if
((
st
&
htonl
(
0xFFC00000
))
==
htonl
(
0xFEC00000
))
return
(
IPV6_ADDR_SITELOCAL
|
type
);
return
(
IPV6_ADDR_SITELOCAL
|
type
);
if
((
addr
->
s6_addr32
[
0
]
|
addr
->
s6_addr32
[
1
])
==
0
)
{
if
((
addr
->
s6_addr32
[
0
]
|
addr
->
s6_addr32
[
1
])
==
0
)
{
...
@@ -225,23 +225,23 @@ int ipv6_addr_type(struct in6_addr *addr)
...
@@ -225,23 +225,23 @@ int ipv6_addr_type(struct in6_addr *addr)
if
(
addr
->
in6_u
.
u6_addr32
[
3
]
==
0
)
if
(
addr
->
in6_u
.
u6_addr32
[
3
]
==
0
)
return
IPV6_ADDR_ANY
;
return
IPV6_ADDR_ANY
;
if
(
addr
->
s6_addr32
[
3
]
==
__constant_
htonl
(
0x00000001
))
if
(
addr
->
s6_addr32
[
3
]
==
htonl
(
0x00000001
))
return
(
IPV6_ADDR_LOOPBACK
|
type
);
return
(
IPV6_ADDR_LOOPBACK
|
type
);
return
(
IPV6_ADDR_COMPATv4
|
type
);
return
(
IPV6_ADDR_COMPATv4
|
type
);
}
}
if
(
addr
->
s6_addr32
[
2
]
==
__constant_
htonl
(
0x0000ffff
))
if
(
addr
->
s6_addr32
[
2
]
==
htonl
(
0x0000ffff
))
return
IPV6_ADDR_MAPPED
;
return
IPV6_ADDR_MAPPED
;
}
}
st
&=
__constant_
htonl
(
0xFF000000
);
st
&=
htonl
(
0xFF000000
);
if
(
st
==
0
)
if
(
st
==
0
)
return
IPV6_ADDR_RESERVED
;
return
IPV6_ADDR_RESERVED
;
st
&=
__constant_
htonl
(
0xFE000000
);
st
&=
htonl
(
0xFE000000
);
if
(
st
==
__constant_
htonl
(
0x02000000
))
if
(
st
==
htonl
(
0x02000000
))
return
IPV6_ADDR_RESERVED
;
/* for NSAP */
return
IPV6_ADDR_RESERVED
;
/* for NSAP */
if
(
st
==
__constant_
htonl
(
0x04000000
))
if
(
st
==
htonl
(
0x04000000
))
return
IPV6_ADDR_RESERVED
;
/* for IPX */
return
IPV6_ADDR_RESERVED
;
/* for IPX */
return
type
;
return
type
;
}
}
...
...
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