PATCH: Linux 2.2.17 not RFC1812 compliant

From: Mario Lorenz (ml@vdazone.org)
Date: Fri Oct 06 2000 - 10:36:28 EDT

  • Next message: Rik van Riel: "Re: lowish-latency patch for 2.4.0-test9"

    Hi folks,

    Linux 2.2.17 (only tested version, I assume all other 2.2 series suffer from
    the same problem and possibly 2.4 as well - but I havent even looked at that).

    Assuming a configuration with linuxbox1 eth0 has adresses 192.168.129.1 and
    192.168.130.1, and IP forward being enabled, and another box on the same
    ethernet with IP 192.168.129.10 and a route to 192.168.130.1 via 192.168.129.1
    (eg that machine doesnt handle multiple logical nets on the same ether very
    well). Now this machine pings eg 192.168.130.10.

    The linux box will issue a redirect redirecting to 192.168.130.10, assuming
    that 192.168.129.10 can talk directly to 192.168.130.10. Under RFC 1812
    Rule 5.2.7.2 I think this is illegal (different IP networks...).

    There actually is the "shared_media" sysctl, which is not properly documented
    in Documentation/network/ip-sysctl.txt. Attached ip-sysctl.txt.patch fixes
    that and also documents the behaviour of the ../all/.. and the ../default/..
    sysctl directories as best to my knowledge (ie, I may be wrong)

    That sysctl defaults to 1. It could be argued that it should be better turned
    be 0 (so that RFC1812 compliance is the default).

    But anyway, that sysctl does not work in the situation outlined above,
    since the inet_addr_onlink check in net/ipv4/route.c will return true, because
    FIB_RES_GW(res) will be 0 in that case (192.168.130.0 is directly connected).

    Since I am not sure if patching that inet_addr_onlink routine may break other
    stuff, I propose attached route.c.patch, which checks for this condition and
    puts in the destination address (which is the next hop in this case) on that
    check.

    Comments ?

    Greetings,

    Mario





    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Fri Oct 06 2000 - 10:38:30 EDT