grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC Remove classful causing incorrect routing behavior


From: Mroczek, Joseph T
Subject: RFC Remove classful causing incorrect routing behavior
Date: Sat, 19 Apr 2014 00:48:04 +0000

Hello:

Currently, the DHCP logic assumes that if a gateway is received in the DHCP 
packet the boot server is on a remote network. Given that CIDR is now over 20 
years old, I think it is a safe assumption that a netmask will be offered in 
DHCP options. 

Can this be removed? Or is there still a need to cover the classful case?

Thank you for any attention you can pay this matter.

~joe


diff -Naur grub-2.02~beta2/grub-core/net/bootp.c 
grub-2.02~beta2-jtm-clean/grub-core/net/bootp.c
--- grub-2.02~beta2/grub-core/net/bootp.c       2013-12-24 11:40:31.000000000 
-0500
+++ grub-2.02~beta2-jtm-clean/grub-core/net/bootp.c     2014-04-18 
20:38:05.858208600 -0400
@@ -191,18 +227,6 @@
   if (bp->gateway_ip)
     {
       grub_net_network_level_netaddress_t target;
-      grub_net_network_level_address_t gw;
-      char *rname;
-         
-      target.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
-      target.ipv4.base = bp->server_ip;
-      target.ipv4.masksize = 32;
-      gw.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
-      gw.ipv4 = bp->gateway_ip;
-      rname = grub_xasprintf ("%s:gw", name);
-      if (rname)
-       grub_net_add_route_gw (rname, target, gw);
-      grub_free (rname);
 
       target.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4;
       target.ipv4.base = bp->gateway_ip;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]