[Xorp-users] Sending update packets

Atanu Ghosh atanu@ICSI.Berkeley.EDU
Tue, 16 Nov 2004 18:21:36 -0800

>>>>> "Nathan" == Nathan K <doesnotcount@hotmail.com> writes:

    Nathan> I'm attempting to build and send an update packet to xorp
    Nathan> peer using the UpdatePacket class and the
    Nathan> Peer::send_update_message method. When I send update packets
    Nathan> with nlri information and various path attributes, there are
    Nathan> no problems. However, when I send an update packet with a
    Nathan> single withdrawn route, it doesn't seem to get sent out.

    Nathan> The packet is built like so:

    Nathan> UpdatePacket packet; IPv4 ip(<ip in network-byte-order>);
    Nathan> IPv4Net ipnet(ip, prefLength); BGPUpdateAttrib
    Nathan> attrib(ipnet); packet.add_withdrawn(attrib);

    Nathan> And sent like this: send_update_message(packet);

    Nathan> My problem is typically send_message_complete usually gets
    Nathan> called with a DATA event, but in the above case, I only get
    Nathan> a FLUSH event and tcpdump reveals that no data was sent
    Nathan> out. Dumping the string representation of the packet before
    Nathan> it is sent gives this:

    Nathan> Update Packet - Withdrawn

    Nathan> Which should be fine.

    Nathan> Any ideas what I'm doing wrong here? Thanks.

It looks like what you are doing should work. There are two issues to
1) The XORP bgp process will not propagate a withdraw if it does not
have a record of the original route.
2) If you are receiving a FLUSH not a DATA event then something has gone
wrong. The most likely problem is the TCP connection has been closed.