Frame Overhead Discard Problem with Encapsulating Netgraph Node

Gerasimos Dimitriadis gedimitr at auth.gr
Tue Nov 25 02:18:28 PST 2003


Dear all,

I have built a netgraph node that allows the formation of multihop ad hoc wireless networks in FreeBSD. This node employs routing tables based on hardware addresses, in order to give the impression to upper layers that all the network nodes are within one hop. This netgraph node accepts all traffic to the wireless interface and encapsulates it using a custom header. The encapsulated packet propagates towards its destination according to the routing tables maintained at each intermediate host, and when it reaches its final destination the netgraph node deencapsulates it and sends it to the upper layers (upper hook of ng_ether node).

This scheme worked fine with FreeBSD 4.7. However, when I ported it to 5.1 it was broken. I found out that the received encapsulated frames were discarded, because their size were longer than accepted / expected by the kernel (The if_ethersubr.c makes these checks in 5.1). The message appearing was:

wi0: discard oversize frame (len 1536 > max 1514)

no matter if I reduced the interface MTU, this message persists.

I would like to ask you how can I tell the upper layers (i.e. IP, TCP/UDP) to leave more size in a packet, so that when my header is added, the total length does not exceed MTU + ether_header_length?

Also, if there is another solution to my problem I would be grateful if you could inform me about it

Thank you very much,

Gerasimos Dimitriadis (gedimitr at auth.gr)


More information about the freebsd-net mailing list