summaryrefslogtreecommitdiff
path: root/sysdep/bsd/krt-sock.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-03-28 22:46:18 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-03-28 22:46:18 +0200
commit52a43ae3b76f86b697537bc3ad8afdb3b421cf2c (patch)
tree15a006b41f3e166c75f46f1ea45cc4fcb1502f5d /sysdep/bsd/krt-sock.c
parentc454872f4e81e69a8e9950289ab810fcac3fc922 (diff)
Minor changes in addresses.
Mainly changes IA_UNNUMBERED to IA_PEER and adds IA_HOST. Also do not show broadcast addr in show interfaces. Nobody cares for that.
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r--sysdep/bsd/krt-sock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index a3e17e27..a4df52ee 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -543,6 +543,9 @@ krt_read_addr(struct ks_msg *msg)
{
ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen));
+ if (masklen == BITS_PER_IP_ADDRESS)
+ ifa.flags |= IA_HOST;
+
if (masklen == (BITS_PER_IP_ADDRESS - 1))
ifa.opposite = ipa_opposite_m1(ifa.ip);
@@ -553,7 +556,7 @@ krt_read_addr(struct ks_msg *msg)
}
else /* PtP iface */
{
- ifa.flags |= IA_UNNUMBERED;
+ ifa.flags |= IA_PEER;
ifa.prefix = ifa.opposite = ifa.brd;
}