Mailing List Archive

[Bug 404] ospf_write_frags() doesn't check return value of sendmsg()
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug
report.

http://bugzilla.quagga.net/show_bug.cgi?id=404


web@pilot.org.ua changed:

What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|paul@dishone.st |web@pilot.org.ua
CC| |paul@dishone.st




------- Additional Comments From web@pilot.org.ua 2007-10-04 16:17 -------
I am working on a more smart buffer driving code.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
Quagga-bugs mailing list
Quagga-bugs@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-bugs
[Bug 404] ospf_write_frags() doesn't check return value of sendmsg() [ In reply to ]
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug
report.

http://bugzilla.quagga.net/show_bug.cgi?id=404


web@pilot.org.ua changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED




------- Additional Comments From web@pilot.org.ua 2007-10-05 13:31 -------
The original problem figured out to be in ospf_write_frags() not being called at
all:

/*
* OSPF Fragmentation / fragmented writes
*
* ospfd can support writing fragmented packets, for cases where
* kernel will not fragment IP_HDRINCL and/or multicast destined
* packets (ie TTBOMK all kernels, BSD, SunOS, Linux). However,
* SunOS, probably BSD too, clobber the user supplied IP ID and IP
* flags fields, hence user-space fragmentation will not work.
* Only Linux is known to leave IP header unmolested.
* Further, fragmentation really should be done the kernel, which already
* supports it, and which avoids nasty IP ID state problems.
*
* Fragmentation of OSPF packets can be required on networks with router
* with many many interfaces active in one area, or on networks with links
* with low MTUs.
*/
#ifdef GNU_LINUX
#define WANT_OSPF_WRITE_FRAGMENT
#endif




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
Quagga-bugs mailing list
Quagga-bugs@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-bugs
[Bug 404] ospf_write_frags() doesn't check return value of sendmsg() [ In reply to ]
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug
report.

http://bugzilla.quagga.net/show_bug.cgi?id=404





------- Additional Comments From paul@dishone.st 2007-10-05 15:16 -------
Oh humbug, I forgot that write_frags was linux-only. If it did occur to me, I
must have assumed you knew and had gotten it working on BSD.. sorry.

Here's what I know from the original bug (bug #107):

- There is no mechanism in OSPF for splitting an LSA across packets, and certain
LSAs are variable sized and potentially can grow very large (e.g. imagine a
router with hundreds of OSPF links to describe in its router-LSA. Think L2/L3
switches, VLANs, PPP servers, etc).
- Even if Quagga takes care never to generate large LSAs *(e.g. by refusing to
do so, requiring admins to configure areas, whatever..), we can't stop other
speakers doing so and Quagga might have to flood such LSAs
- So OSPF speaker /must/ be able to send and receive fragmented OSPF packets to
be RFC conformant

On the receive side, all platforms we support transparently reassemble IP
fragments (AFAIK), so we're fine.

For the send-side we need either the kernel to accept over-size OSPF packets
written to the raw socket, or we need Quagga ospfd to do the fragmentation.
Neither Linux nor Solaris (the two platforms I've tested, bug #107 was reported
with Linux as platform) do fragmentation in-kernel for raw sockets - presumably
same applies to BSD.

To fix the bug I implemented IP fragmentation in ospfd. A hack, but it worked on
Linux. In testing on Solaris I found that the IP ID field was reset by the
Solaris kernel to a new ID, thus breaking the userspace fragmentation. AFAIK,
Solaris is copying BSD behaviour.

To fix this bug fully for BSD, you have no choice but to fix the kernel. The
best option is to add a sockopt to the kernel to enable the existing kernel code
for IP fragmentation for raw sockets.

The other option is to add a sockopt to BSD so ospfd can tell BSD to *not*
clobber the IP ID (and one other) field. Then you can enable the existing IP
fragmentation code in ospfd.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
Quagga-bugs mailing list
Quagga-bugs@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-bugs