Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iputils static pie build #86

Open
StefanJum opened this issue Mar 31, 2023 · 3 comments · May be fixed by #87
Open

Add iputils static pie build #86

StefanJum opened this issue Mar 31, 2023 · 3 comments · May be fixed by #87

Comments

@StefanJum
Copy link
Member

Add iputils commands as a -static-pie build. Test it natively on Linux and with run-elfloader on Unikraft. In case of issues with Unikraft, post an issue in the Unikraft core repository.

Follow the structure of existing applications or submitted for review applications: create a folder with build.sh script, a README.md file, a rootfs/ subfolder (if required), the -static-pie built executable and other useful files.

Hackathon points: 40

@kouk
Copy link

kouk commented Mar 31, 2023

Working on this with @iAmGroute and @Se7enBit

@kouk
Copy link

kouk commented Mar 31, 2023

We are facing two issues with this:

  1. ping defaults to using normal sockets but there's a bug in lwip where the package is sent using UDP protocol instead of ICMP.
  2. Add RAW socket type to LwIP lib-lwip#2
    these are probably related?

@kouk
Copy link

kouk commented Mar 31, 2023

We managed to build lwip with LWIP_RAW=1 and then we could ping like this:

./run_elfloader -k ../app-elfloader/build/app-elfloader_kvm-x86_64 -g -n ../static-pie-apps/iputils/ping -n -4 -v -d -e 0 172.44.0.3

The -e 0 option forces use of a RAW socket, instead of the default which is a Ping socket.

@kouk kouk linked a pull request Mar 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants