Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
710aa44
bsd: Added unmodified IPv6 .h files from FreeBSD 9.0
cmyers-spirent Aug 7, 2018
f6c6da8
bsd: Added unmodified IPv6 .c files from FreeBSD 9.0
cmyers-spirent Aug 7, 2018
a67e8b4
bsd: Renamed IPv6 files from *.c to *.cc
cmyers-spirent Aug 7, 2018
0638125
bsd: Modify FreeBSD IPv6 .h files for OSv
cmyers-spirent Aug 7, 2018
efd6b23
bsd: Modify FreeBSD IPv6 .cc files for OSv
cmyers-spirent Aug 7, 2018
ee7b0ef
bsd: Added IPv6 net channel support
wkozaczuk Dec 11, 2019
64a0c1a
bsd: Modifications to shared IPv4/IPv6 code (eth,tcp,udp) for IPv6
cmyers-spirent Aug 7, 2018
7238935
bsd: OSv API support for IPv6
wkozaczuk Dec 11, 2019
f1cd48e
bsd: Added partial Linux NETLINK socket support
cmyers-spirent Aug 7, 2018
d35c3dd
libc: Fix if_indextoname(), if_nametoindex()
cmyers-spirent Aug 7, 2018
b687b7c
libc: Add IPv6 support to getifaddrs(), if_nameindex() using NETLINK …
cmyers-spirent Aug 7, 2018
ea13cb1
bsd: Fix SIOCSIFNAME when using linux compatiblity socket
cmyers-spirent Aug 7, 2018
0385147
bsd: linux socket support for IPv6, IP_PKTINFO, IPV6_PKTINFO, SCM_TIM…
cmyers-spirent Aug 7, 2018
87fb81b
bsd: Added unit tests for IPv6 TCP, IP_PKTINFO, IPV6_PKTINFO, SCM_TIM…
wkozaczuk Dec 11, 2019
47381fb
bsd: Added conf-INET6 option to enable IPv6 support
wkozaczuk Dec 11, 2019
2ead349
ipv6: addressed most gcc8/9 warnings
wkozaczuk Dec 12, 2019
cef7d8e
ipv6: addressed remaining compiler warnings
wkozaczuk Dec 12, 2019
8752111
ipv6: fixed bugs in field addr macros
wkozaczuk Dec 12, 2019
089249c
Merge branch 'master' into ipv6
wkozaczuk Dec 20, 2019
6e317ff
Merge branch 'master' into ipv6
wkozaczuk Mar 27, 2020
57ed0a4
unit tests: replace deprecated BOOST_MESSAGE with BOOST_TEST_MESSAGE
wkozaczuk Mar 27, 2020
853d1df
travis: trigger build for specific branch
wkozaczuk Mar 27, 2020
86d5e14
travis: set name of the branch to ipv6 when passed to docker build
wkozaczuk Apr 7, 2020
a5e5239
travis: another attempt to checkout ipv6 branch
wkozaczuk Apr 7, 2020
20ce67f
Merge branch 'master' into ipv6
wkozaczuk May 1, 2020
258cf66
Merge branch 'master'
wkozaczuk May 12, 2020
e53bf9a
Merge branch 'master' into ipv6
wkozaczuk Aug 29, 2020
40e1be8
bsd: changed __unused* macro usage to __bsd_unused
wkozaczuk Aug 29, 2020
5a5cd45
Merge master
wkozaczuk Jan 24, 2022
1dc9b12
Merged master
wkozaczuk Jun 2, 2022
9a103de
Merge master
wkozaczuk Oct 17, 2022
9989948
Fix tst-tcp-v6.cc test
wkozaczuk Oct 23, 2022
4f01d83
Merge master
wkozaczuk Nov 18, 2024
1916ab5
net: forward-port FreeBSD IPv6 stack with SLAAC + DHCPv6 autoconfig
gburd Jul 13, 2026
ec28324
copyright: correct new IPv6/DHCPv6 file attribution to the actual author
gburd Jul 14, 2026
eaa48fb
net: fix OOB reads and unbounded growth in IPv6 net-channel classifie…
gburd Jul 14, 2026
e617dae
ipv6: drop spurious revert of merged signal/pthread changes
gburd Jul 15, 2026
b06d3df
Merge branch 'master' into pr/ipv6-forward-port
gburd Jul 15, 2026
eea48c6
virtio-net: enable IPv6 checksum and TSO offload
gburd Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_install:
- sudo adduser $USER libvirt
- sudo adduser $USER kvm
- echo "$DOCKER_ACCESS_TOKEN" | docker login --username osvunikernel --password-stdin
- pushd docker && docker build -t osv/builder -f ./Dockerfile.builder --build-arg DIST="ubuntu-20.10" . && popd
- pushd docker && docker build -t osv/builder -f ./Dockerfile.builder --build-arg DIST="ubuntu-20.10" --build-arg GIT_BRANCH="ipv6" . && popd
- docker run -it --privileged -d --name build osv/builder
stages:
- build_and_publish
Expand Down
47 changes: 46 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ COMMON = $(autodepend) -g -Wall -Wno-pointer-arith $(CFLAGS_WERROR) -Wformat=0 -
-fno-omit-frame-pointer $(compiler-specific) \
-include compiler/include/intrinsics.hh \
$(conf_compiler_cflags) $(conf_compiler_opt) $(acpi-defines) $(tracing-flags) $(gcc-sysroot) \
-D__OSV__ -D__XEN_INTERFACE_VERSION__="0x00030207" -DARCH_STRING=$(ARCH_STR) $(EXTRA_FLAGS)
$(configuration) -D__OSV__ -D__XEN_INTERFACE_VERSION__="0x00030207" -DARCH_STRING=$(ARCH_STR) $(EXTRA_FLAGS)
COMMON += $(standard-includes-flag)

tracing-flags-0 =
Expand Down Expand Up @@ -398,6 +398,11 @@ $(out)/bsd/%.o: INCLUDES += -isystem bsd/
# for machine/
$(out)/bsd/%.o: INCLUDES += -isystem bsd/$(arch)

configuration-defines = conf-INET6

configuration = $(foreach cf,$(configuration-defines), \
-D$(cf:conf-%=CONF_%)=$($(cf)))

makedir = $(call very-quiet, mkdir -p $(dir $@))
build-so = $(CC) $(CFLAGS) -o $@ $^ $(EXTRA_LIBS)
q-build-so = $(call quiet, $(build-so), LINK $@)
Expand Down Expand Up @@ -688,6 +693,41 @@ bsd += bsd/sys/netinet/cc/cc_cubic.o
bsd += bsd/sys/netinet/cc/cc_htcp.o
bsd += bsd/sys/netinet/cc/cc_newreno.o
bsd += bsd/sys/netinet/arpcache.o
ifeq ($(conf-INET6), 1)
ifeq ($(conf_networking_dhcp6),1)
bsd += bsd/porting/dhcp6.o
endif
bsd += bsd/sys/netinet6/dest6.o
bsd += bsd/sys/netinet6/frag6.o
bsd += bsd/sys/netinet6/icmp6.o
$(out)/bsd/sys/netinet6/icmp6.o: COMMON+=-Wno-address-of-packed-member
bsd += bsd/sys/netinet6/in6.o
$(out)/bsd/sys/netinet6/in6.o: COMMON+=-fno-strict-aliasing
bsd += bsd/sys/netinet6/in6_cksum.o
bsd += bsd/sys/netinet6/in6_ifattach.o
bsd += bsd/sys/netinet6/in6_mcast.o
bsd += bsd/sys/netinet6/in6_pcb.o
bsd += bsd/sys/netinet6/in6_proto.o
bsd += bsd/sys/netinet6/in6_rmx.o
$(out)/bsd/sys/netinet6/in6_rmx.o: COMMON+=-fno-strict-aliasing
bsd += bsd/sys/netinet6/in6_src.o
bsd += bsd/sys/netinet6/ip6_forward.o
bsd += bsd/sys/netinet6/ip6_id.o
bsd += bsd/sys/netinet6/ip6_input.o
bsd += bsd/sys/netinet6/ip6_output.o
bsd += bsd/sys/netinet6/mld6.o
$(out)/bsd/sys/netinet6/mld6.o: COMMON+=-Wno-address-of-packed-member
bsd += bsd/sys/netinet6/nd6.o
$(out)/bsd/sys/netinet6/nd6.o: COMMON+=-fno-strict-aliasing
bsd += bsd/sys/netinet6/nd6_nbr.o
bsd += bsd/sys/netinet6/nd6_rtr.o
$(out)/bsd/sys/netinet6/nd6_rtr.o: COMMON+=-fno-strict-aliasing
bsd += bsd/sys/netinet6/raw_ip6.o
$(out)/bsd/sys/netinet6/raw_ip6.o: COMMON+=-Wno-address-of-packed-member
bsd += bsd/sys/netinet6/route6.o
bsd += bsd/sys/netinet6/scope6.o
bsd += bsd/sys/netinet6/udp6_usrreq.o
endif
endif
ifeq ($(conf_drivers_xen),1)
bsd += bsd/sys/xen/evtchn.o
Expand Down Expand Up @@ -1156,6 +1196,11 @@ objects += core/percpu-worker.o
ifeq ($(conf_networking_dhcp),1)
objects += core/dhcp.o
endif
ifeq ($(conf-INET6),1)
ifeq ($(conf_networking_dhcp6),1)
# bsd/porting/dhcp6.o is added to the bsd list (needs BSD-internal headers)
endif
endif
objects += core/run.o
objects += core/shutdown.o
objects += core/version.o
Expand Down
23 changes: 22 additions & 1 deletion bsd/net.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,22 @@
#include <bsd/sys/net/ethernet.h>
#include <bsd/sys/net/route.h>
#include <bsd/sys/compat/linux/linux_netlink.h>
#ifdef INET6
#include <bsd/sys/netinet/icmp6.h>
#include <bsd/sys/netinet6/in6.h>
#include <bsd/sys/netinet6/mld6.h>
#endif

/* Generation of ip ids */
void ip_initid(void);

extern "C" {
/* AF_INET */
extern struct domain inetdomain;
#ifdef INET6
/* AF_INET6 */
extern struct domain inet6domain;
#endif
/* AF_ROUTE */
extern struct domain routedomain;
/* AF_NETLINK */
Expand All @@ -55,22 +64,34 @@ void net_init(void)
vnet_pfil_init();
domaininit(NULL);
OSV_DOMAIN_SET(inet);
#ifdef INET6
OSV_DOMAIN_SET(inet6);
#endif
OSV_DOMAIN_SET(route);
OSV_DOMAIN_SET(netlink);
rts_init();
route_init();
vnet_route_init();
netlink_init();
#ifdef INET6
ip6_init2(NULL);
mld_init(NULL);
vnet_mld_init(NULL);
#endif
ipport_tick_init(NULL);
arp_init();
domainfinalize(NULL);
cc_init();
if_attachdomain(NULL);
vnet_loif_init();

/* Adding IPv4 address before starting the loopback interface
* cause the interface to be brought up without IPv6 support.
*/

/* Start the loopback device */
osv::start_if("lo0", "127.0.0.1", "255.0.0.0");
osv::ifup("lo0");
osv::start_if("lo0", "127.0.0.1", "255.0.0.0");

debug(" - done\n");
}
Loading