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

busybox: add IPv6 support #75

Merged
merged 3 commits into from
Sep 30, 2024
Merged

busybox: add IPv6 support #75

merged 3 commits into from
Sep 30, 2024

Conversation

mateuszkobak
Copy link
Contributor

@mateuszkobak mateuszkobak commented Apr 17, 2024

Description

  • Added necessary nonblocking flag for socket used in ping6, following the existing solution for ping4
  • Provided IPv6 addresses info for ifconfig
  • Made route.c compile by including net/ip6_route.h

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: ia32-generic-qemu (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

Copy link
Member

@nalajcie nalajcie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nitpicks, otherwise LGTM.

busybox/22-ifconfig-ipv6.patch Outdated Show resolved Hide resolved
busybox/22-ifconfig-ipv6.patch Outdated Show resolved Hide resolved
@anglov
Copy link
Member

anglov commented Sep 25, 2024

Please rebase

Add nonblocking option for socket

JIRA: COG-42
Change the way ifconfig obtains the IPv6 addresses

JIRA: COG-42
Copy link

Unit Test Results

7 723 tests  +23   7 008 ✅ +23   37m 51s ⏱️ -40s
  443 suites + 7     715 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit ffa3cee. ± Comparison against base commit df40217.

This pull request removes 1 and adds 24 tests. Note that renamed tests count towards both.
phoenix-rtos-tests/psh/touch ‑ armv7m7-imxrt117x-evk:phoenix-rtos-tests/psh/touch
phoenix-rtos-tests/mem/mmap ‑ armv7a7-imx6ull-evk:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned
phoenix-rtos-tests/mem/mmap ‑ armv7a7-imx6ull-evk:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned_file
phoenix-rtos-tests/mem/mmap ‑ armv7a7-imx6ull-evk:phoenix-rtos-tests/mem/mmap.test_mmap.len__zero
phoenix-rtos-tests/mem/mmap ‑ armv7a9-zynq7000-qemu:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned
phoenix-rtos-tests/mem/mmap ‑ armv7a9-zynq7000-qemu:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned_file
phoenix-rtos-tests/mem/mmap ‑ armv7a9-zynq7000-qemu:phoenix-rtos-tests/mem/mmap.test_mmap.len__zero
phoenix-rtos-tests/mem/mmap ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned
phoenix-rtos-tests/mem/mmap ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned_file
phoenix-rtos-tests/mem/mmap ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/mem/mmap.test_mmap.len__zero
phoenix-rtos-tests/mem/mmap ‑ armv7m4-stm32l4x6-nucleo:phoenix-rtos-tests/mem/mmap.test_mmap.len__not_page_aligned
…

@mateuszkobak
Copy link
Contributor Author

Rebased

@anglov anglov merged commit 707ec1d into master Sep 30, 2024
30 checks passed
@anglov anglov deleted the mateuszkobak/ipv6 branch September 30, 2024 08:27
+ inet_ntop(AF_INET6, &addr->sin6_addr, addr6, 50);
+
+ /* Get the prefix length */
+ unsigned char *c = ((struct sockaddr_in6 *)ifap->ifa_netmask)->sin6_addr.s6_addr;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks: -Wdeclaration-after-statement declared in Makefile.flags of busybox. For some reason on GCC 9.5 warn is not issued but on gcc 14.2 it is.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update its also triggered on 9.50 my bad

sockfd6 = xsocket(AF_INET6, SOCK_DGRAM, 0);
- xioctl(sockfd6, SIOCGIFINDEX, &ifr);
- ifr6.ifr6_ifindex = ifr.ifr_ifindex;
- ifr6.ifr6_prefixlen = prefix_len;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This break -Wunused-but-set-variable on prefix_len which is part of -Wall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants