summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsalib.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-30 15:39:06 +0200
committerOndrej Filip <feela@network.cz>2000-05-30 15:39:06 +0200
commit2aa476a535c878a412bb732eae16d97848f07ff3 (patch)
treed5d5059edefa2a88b39261ed75cc94e60f6705ed /proto/ospf/lsalib.c
parent76e2514328a71abd1ed37b9b32421d2ab924b4c0 (diff)
downloadbird-2aa476a535c878a412bb732eae16d97848f07ff3.tar
bird-2aa476a535c878a412bb732eae16d97848f07ff3.zip
Yeah, the endianity bug found.
Diffstat (limited to 'proto/ospf/lsalib.c')
-rw-r--r--proto/ospf/lsalib.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c
index 646e478..020ca62 100644
--- a/proto/ospf/lsalib.c
+++ b/proto/ospf/lsalib.c
@@ -117,7 +117,8 @@ htonlsab(void *h, void *n, u8 type, u16 len)
hs=h;
ns=n;
- ns->netmask=ipa_hton(hs->netmask);
+ ns->netmask=hs->netmask;
+ ipa_hton(ns->netmask);
hn=(struct ospf_lsa_summ_net *)(hs+1);
nn=(struct ospf_lsa_summ_net *)(ns+1);
@@ -139,7 +140,8 @@ htonlsab(void *h, void *n, u8 type, u16 len)
he=h;
ne=n;
- ne->netmask=ipa_hton(he->netmask);
+ ne->netmask=he->netmask;
+ ipa_hton(ne->netmask);
ht=(struct ospf_lsa_ext_tos *)(he+1);
nt=(struct ospf_lsa_ext_tos *)(ne+1);
@@ -212,7 +214,8 @@ ntohlsab(void *n, void *h, u8 type, u16 len)
hs=h;
ns=n;
- hs->netmask=ipa_ntoh(ns->netmask);
+ hs->netmask=ns->netmask;
+ ipa_ntoh(hs->netmask);
hn=(struct ospf_lsa_summ_net *)(hs+1);
nn=(struct ospf_lsa_summ_net *)(ns+1);
@@ -234,7 +237,8 @@ ntohlsab(void *n, void *h, u8 type, u16 len)
he=h;
ne=n;
- he->netmask=ipa_ntoh(ne->netmask);
+ he->netmask=ne->netmask;
+ ipa_ntoh(he->netmask);
ht=(struct ospf_lsa_ext_tos *)(he+1);
nt=(struct ospf_lsa_ext_tos *)(ne+1);