From: Pascal H. <pa...@pl...> - 2011-08-03 20:22:42
|
Hello, Here are two small patches for the br2684 kernel module against the 3.0 source tree. I adapted and tested them briefly on the 2.6.32 kernel I currently use, using a pair of virtual ATM interfaces created by atmarp. These are my first kernel patches, so please bear with me. [PATCH 1/2] atm: br2684: Improve encapsulation checks - Check that the LLC header matches the expected payload type. - Remove the FCS bytes only if the PID is ethernet with FCS. - Check the data length before removing the FCS or padding bytes. Accepting a PDU with the wrong LLC encapsulation could do nasty things. I triggered a kernel panic by sending an LLC routed PDU to an LLC bridged interface on a default 2.6.32 Debian kernel. Discussion : Should we check the padding bytes value in received bridged PDUs ? Or should we follow the saying "be conservative in what you send, and liberal in what you accept" ? Currently, it is checked in VC-MUX mode, but not in LLC mode. [PATCH 2/2] atm: br2684: Do not allocate more headroom than needed Routed encapsulation requires less headroom than bridged encapsulation. |