]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Defined IP_PREC_INTERNET_CONTROL and made all (well, both :)) protocols
authorMartin Mares <mj@ucw.cz>
Tue, 1 Jun 1999 13:57:24 +0000 (13:57 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 1 Jun 1999 13:57:24 +0000 (13:57 +0000)
use it when creating sockets.

lib/ipv4.h
proto/ospf/ospf.c
proto/ospf/ospf.h
proto/rip/rip.c

index 87e08742bf4ddaef88359f76e7e3b9f8a0bb98a0..5cb2835e513fa5fea416fa54f66d278b390fa5b0 100644 (file)
@@ -77,4 +77,6 @@ static inline int ipv4_compare(u32 x, u32 y)
   return (x > y) - (x < y);
 }
 
+#define IP_PREC_INTERNET_CONTROL 0xc0
+
 #endif
index 2836561fde04c13024d2226dacafca3f52fe4667..47c87f887dc1d09a6f6ac6e29a63e27551b44204 100644 (file)
@@ -229,7 +229,7 @@ ospf_open_socket(struct proto *p, struct ospf_iface *ifa)
     mcsk->dport=OSPF_PROTO;
     mcsk->saddr=AllSPFRouters;
     mcsk->daddr=AllSPFRouters;
-    mcsk->tos=OSPF_IP_PRI;
+    mcsk->tos=IP_PREC_INTERNET_CONTROL;
     mcsk->ttl=1;
     mcsk->rx_hook=ospf_rx_hook;
     mcsk->tx_hook=ospf_tx_hook;
index 9d45993e780b7ba4b45a0d75cdb0889d3a8fbf25..19c9eeb1e46f693340dea2a64c6dd47a2b17fc25 100644 (file)
@@ -12,7 +12,6 @@
 #define OSPF_PROTO 89
 #ifndef IPV6
 #define OSPF_VERSION 2
-#define OSPF_IP_PRI 0xc0
 #define AllSPFRouters ipa_from_u32(0xe0000005) /* 224.0.0.5 */
 #define AllDRouters ipa_from_u32(0xe0000006)   /* 224.0.0.6 */
 #else
index a3ddf61509b2648761425edaaa7b94b78949bedc..a2457b79be84af5638d20472d68873f48417b348 100644 (file)
@@ -488,6 +488,7 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_
   rif->sock->daddr = IPA_NONE;
   rif->sock->dport = P_CF->port;
   rif->sock->ttl = 1; /* FIXME: care must be taken not to send requested responses from this socket */
+  rif->sock->tos = IP_PREC_INTERNET_CONTROL;
 
   if (flags & IF_BROADCAST)
     rif->sock->daddr = new->addr->brd;