[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: RFC Remove classful causing incorrect routing behavior
From: |
Mroczek, Joseph T |
Subject: |
RE: RFC Remove classful causing incorrect routing behavior |
Date: |
Mon, 21 Apr 2014 15:56:07 +0000 |
> From: Behalf Of Vladimir 'f-coder/phcoder' Serbinenko
> On 19.04.2014 02:48, Mroczek, Joseph T wrote:
> > 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?
> >
> Please detail the failure scenario.
> Current code follows standard behaviour for PXE clients and changing it
> would break any installation which relies on it.
The failure will occur in most if not all cases where the DHCP sends a gateway
when the boot server is on the same subnet as the client, with the additional
condition that the gateway and boot server are on different hosts. There may be
some routers that will forward the traffic back on the local subnet, but most
routers do not do this. The net result is grub fails to contact the boot
server. I am not sure what you mean by standard behavior. Mulitple Intel option
ROMs (i386 & EFI), broadcom option ROMs, gPXE, Microsoft WDS, and
syslinux/pxelinux all route properly for local boot servers when both netmask
and gateway are set.
The only use cases I could see breaking with this change require two
conditions, one of which I would be very surprised to see. The two conditions
are that the boot server is on a remote network (not-common but does happen),
and the DHCP server does not send a subnet mask in options (rare to
non-existent.) Not sending a subnet mask in this day and age is arguably broken
behavior.
~joe
> > 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;
> >
> > _______________________________________________
> > Grub-devel mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
- RFC Remove classful causing incorrect routing behavior, Mroczek, Joseph T, 2014/04/18
- Re: RFC Remove classful causing incorrect routing behavior, Vladimir 'φ-coder/phcoder' Serbinenko, 2014/04/20
- RE: RFC Remove classful causing incorrect routing behavior,
Mroczek, Joseph T <=
- Re: RFC Remove classful causing incorrect routing behavior, Andrey Borzenkov, 2014/04/21
- RE: RFC Remove classful causing incorrect routing behavior, Mroczek, Joseph T, 2014/04/21
- Re: RFC Remove classful causing incorrect routing behavior, Andrey Borzenkov, 2014/04/21
- RE: RFC Remove classful causing incorrect routing behavior, Mroczek, Joseph T, 2014/04/28