Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
89dc383a
Commit
89dc383a
authored
Oct 12, 1999
by
Martin Mareš
Browse files
Changed syntax of ip_class_mask, the old one was stupid.
parent
d3dd620b
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/ipv4.h
View file @
89dc383a
...
...
@@ -53,7 +53,7 @@ typedef u32 ip_addr;
#define ipa_ntoh(x) x = _MI(ntohl(_I(x)))
#define ipa_classify(x) ipv4_classify(_I(x))
#define ipa_opposite(x) _MI(_I(x) ^ 1)
#define ipa_class_mask(x)
x =
_MI(ipv4_class_mask(_I(x)))
#define ipa_class_mask(x) _MI(ipv4_class_mask(_I(x)))
#define ipa_from_u32(x) _MI(x)
#define ipa_to_u32(x) _I(x)
#define ipa_compare(x,y) ipv4_compare(_I(x),_I(y))
...
...
proto/rip/rip.c
View file @
89dc383a
...
...
@@ -318,10 +318,8 @@ rip_process_packet( struct proto *p, struct rip_packet *packet, int num, ip_addr
#ifndef IPV6
ipa_ntoh
(
block
->
netmask
);
ipa_ntoh
(
block
->
nexthop
);
if
(
packet
->
heading
.
version
==
RIP_V1
)
{
block
->
netmask
=
block
->
network
;
/* MJ: why are macros like this?! */
ipa_class_mask
(
block
->
netmask
);
}
if
(
packet
->
heading
.
version
==
RIP_V1
)
block
->
netmask
=
ipa_class_mask
(
block
->
network
);
#endif
process_block
(
p
,
block
,
whotoldme
);
}
...
...
Write
Preview
Supports
Markdown
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