When a vulnerabiltiy is found in the OpenBSD base system the developers will issue
what is known as a patch. This also happens with third-party programs and, from
time to time, someone will come up with a patch or "diff" on their own. That's what
prompted me to put this short write up together. netstat(1) in OpenBSD 4.3 was
behaving differently than in previous versions. There's a thread concerning the issue
at netstat -l in 4.3 shows lo0 too, and a link to a patch at nestat if.c 1.57 patch.
Before going any further, I should say the place to start on patching is first reading
the patch(1) man page and reading the OpenBSD FAQ dealing with applying
patches at Applying patches in OpenBSD. The OpenBSD documentation is excellent!
Sometimes, though, it can be a bit intimidating and hard to understand to someone
new to the operating system. That's why I'm writing this, as I ran into something I
hadn't seen before when applying standard patches issued by the developers.
I downloaded the patch mentioned above, did a cd /usr/src and ran the command:
patch -p0 < /path/to/if.c.patchIn retrospect, I'm sorry I didn't use the script(1) command to save the output of
Hmm... Looks like a unified diff to me...That'll be followed by a message saying what bug or vulnerability is being fixed with
The text leading up to this was:
Patching file path/to/whatever.c using Plan A...This time, however, I was asked what I wanted to patch. I messed it up the first time
Hunk #1 succeeded at 410.
done
/usr/src/usr.bin/netstat/if.cThis time the patch succeeded. Then all I had to do was change directory to the path
make && make installNow when I run the command netstat -I xl0 all I get is the info related to xl0 which
No affiliation between this site and the OpenBSD project exists or is implied.