Subject: [OSPF] Making OSPF _not_ set the E bit in the router-lsa when redistributing

From: Vlad Olariu <[email-masked]>
Date: Tue, 15 Dec 2015 21:42:53 +0100

Hi All,

I am unsure this is the right place to ask this, but there aren't many OSPF
forums around the net.

In dealing with a Cisco box I encountered a bug where the router would
originate a default route in OSPF but it wouldn't set the E bit in the
router-lsa (indicating it is an ASBR).

I wanted to replicate the bug on my home computer by making OSPF behave
_not_ according to RFC, yet I found it rather difficult to do.

With linux I created a bridge and connected two routers on each side, yet
now I am only able to see traffic go *through* but I have no power over
changing the actual packet contents.

People have been talking about "divert sockets" but those appear to me:

1. Related to TCP/IP ports
2. To work best on FreeBSD of which I have no particular knowledge

Doing a "man in the middle" "attack" is a lot harder than what it seemed,
as no tool I have looked at lets you change particular bits in packets
passing through your linux box (not any with the same feel like wireshark
at least).

I would guess that people implementing the protocol for years now would
have found a simpler way of testing things like these, hence here I am in
search of any advice.

I also looked into scapy which, while great in capturing, changing and
sending packets it does not let me do this "real time". In reality it lets
you make a copy of a packet passing through which it then lets you change
and send at your will (meanwhile the original packet is long gone).

Any help would be very appreciated.

Vlad.