Changes in the 2.2 MASQ: maddr problems

From: Julian Anastasov (uli@linux.tu-varna.acad.bg)
Date: Sat Apr 01 2000 - 06:16:54 EST

  • Next message: Dominik Kubla: "Re: GPF on 6502 Linux with 2.3.99-pre4"

            Hello,

            This is a patch for the 2.2.15pre16 masquerade to correctly
    support multiple output devices. I didn't tested it: no masq env.
    This patch is only compiled.

            The problems:

    - The DLOOSE entries incorrectly talk to a destination using wrong maddr
    as a source address. For the NO_DADDR entries it is possible the assigned
    maddr to be wrong because the destination is not known when the entry is
    created with a specific maddr, f.e. ip_masq_irc.

            The proposed changes:

    - change ms->maddr after changing ms->daddr, i.e. if the routing
    requires new src address (maddr) for the outgoing packets. This is
    required for entries with NO_DADDR and DLOOSE flags, i.e. when the
    maddr is not known until the ms->daddr is correct. For the DLOOSE
    entries changing the ms->maddr after receiving an incoming/outgoing
    packet is not required from the masquerade but it can be used from
    ip_masq_user to select entries by maddr (is that correct?).

    - allow NO_DADDR and DLOOSE entries to listen on all devices, i.e.
    by ignoring maddr in the lookups.

    - ip_masq_ftp changed to lookup by maddr.

    - ip_masq_user now uses maddr specified from the user space. I'm not
    sure if ipmasqadm must be patched but it looks like that is not
    needed.

            One question to the net gurus:

            Is the change in icmp.c correct? Is the original daddr in
    rt->key.dst ?

            Please, someone to test. I'm unable to test all aspects of the
    MASQ code.

    Regards

    --
    Julian Anastasov <uli@linux.tu-varna.acad.bg>
    


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



    This archive was generated by hypermail 2b29 : Sat Apr 01 2000 - 06:25:32 EST