Live data from Hacker News

eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

blog.gripdev.xyz

1–10 of 35 posts

Re: eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

#3
In a similar fashion, I once saw a python script that called out to a one-page C program that read a .csv dump (probably from SQLServer) and blew away the upper byte of each character, demoting it to ASCII.

Once I understood what was afoot, I was sad that someone had worked so hard when python's open() call supports an 'encoding' argument for just these occasions.

Re: eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

#4
post #3

In a similar fashion, I once saw a python script that called out to a one-page C program that read a .csv dump (probably from SQLServer) and blew away the upper byte of each character, demoting it to ASCII. Once I understood what was afoot, I was sad that someone had worked so hard when python's open() call supports an 'encoding' argument for just these occasions.

Reminds me of a time where someone stored the md5 hash of a password as a string by throwing away all non-ascii bytes; so roughly half the bytes.

Re: eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

#5
post #4
post #3

In a similar fashion, I once saw a python script that called out to a one-page C program that read a .csv dump (probably from SQLServer) and blew away the upper byte of each character, demoting it to ASCII. Once I understood what was afoot, I was sad that someone had worked so hard when python's open() call supports an 'encoding' argument for just these occasions.

Reminds me of a time where someone stored the md5 hash of a password as a string by throwing away all non-ascii bytes; so roughly half the bytes.

I've seen something similar, but it depended on whether plain `char` is signed or unsigned, which is highly platform-dependent.

Re: eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

#6
post #3

In a similar fashion, I once saw a python script that called out to a one-page C program that read a .csv dump (probably from SQLServer) and blew away the upper byte of each character, demoting it to ASCII. Once I understood what was afoot, I was sad that someone had worked so hard when python's open() call supports an 'encoding' argument for just these occasions.

that's the first thing i ever uploaded anywhere! fixtxt.exe on simtel.net

Re: eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

#7
If you think that's wild, just wait until you learn about 6to4 [1] (not to be confused with 6over4 [2] ...)

TL;DR: Given a globally unique IPv4 address, you can create automatic tunneling IPv6 networks with the IPv4 address embedded into the IPv6 address space.

[1] https://en.wikipedia.org/wiki/6to4

[2] https://en.wikipedia.org/wiki/6over4

Re: eBPF Mystery: When is IPv4 not IPv4? When it's pretending to be IPv6

#10

If you think that's wild, just wait until you learn about 6to4 [1] (not to be confused with 6over4 [2] ...) TL;DR: Given a globally unique IPv4 address, you can create automatic tunneling IPv6 networks with the IPv4 address embedded into the IPv6 address space. [1] https://en.wikipedia.org/wiki/6to4 [2] https://en.wikipedia.org/wiki/6over4

And for a short while, it was the most common use of IPv6 on the public Internet! Now largely dead and gone.
Post reply on HN