Age | Commit message (Collapse) | Author | Files | Lines |
|
All addresses in struct tun_t were stored as an in_addr.
But IPv6 addresses need an in6_addr, so switch tun_t addresses
to the in64_addr wrapper struct.
This is an ABI break, as documented in TODO-RELEASE.
Fixes an out of bounds memcpy() identified by Coverity.
Change-Id: Idd2431ad25d7fa182e52e2bd5231ceb04d427c34
Related: CID#174278
|
|
This way, the IP address / route handling between TUN devices and kernel
GTP can be shared, which will provide not only a unified codebase but
also a more consistent behavior.
This also paves the road for to use kernel GTP from sgsnemu in the future.
Related: OS#3214
Change-Id: Ic53a971136edd0d8871fbd6746d7b0090ce3a188
|
|
Change-Id: I02e057d30b6773c17ea6bc31094e53587971e9e7
|
|
Change-Id: Ib021e392637a43d5cf1b40e0d50621fe7e854ba5
|
|
There's nothing specific to tun devices in adding a route to the kernel.
Change-Id: Ib077934aa5f3c9bed06e2cf16a980c965a7a046d
|
|
sgsnemu (the only user of this API so far) has been modified to use the
new API with in46_addr.
FreeBSD code for IPv6 has not been tested.
Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767
|
|
netdev_ip_local_get() is a generalized version of tun_ip_local_get()
which supports the net device as argument, rather than a tun_t.
Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6
|
|
Add support for IPv4 and IPv6 global IPs. Also return the prefix length
of the IP address by using a in46_prefix.
Change-Id: I277af191dc611b6bbcb83479f4ae338083740322
|
|
Change-Id: I8e24f95a88bef3a59006a89c219871e6156963d7
|
|
I'm not quite sure how I ended up doing this, but for some strange
reason the code before this commit is sending the ICMPv6 Router
Advertisements from some weird non-standard source address. This is
a violation of RFC4861 which clearly states that the source address
of router advertisements "MUST be the link-local address assigned to the
interface from which this message is sent."
Change-Id: Ib444af70fc8f0b433d371281601fd5a37b29039e
|
|
Change-Id: I9613ca3436e77ea132c47f0096df7c5050d7e826
|
|
This allows the application to attach some private state to the tun
device, such as the context from which it was created/allocated
Change-Id: Ief43b9b5fab5830fa8e28362c795f88f0b4d353b
|
|
Change-Id: I979867d643c9fa912884fe55105333dbad39ab97
|
|
As we can now have PDP contexts with IPv6 user IP payload,
it is useful to extend the TUN related code to be able to
configure the tun device IPv6 address + prefix length
Change-Id: I899d21e52d02e0b8384af29ddd489ff19c8f2cf6
|
|
We can simply use 'struct iphdr' from netinet/ip.h to achieve
the same goal (and be portable).
Change-Id: Ieece22e127dc14a7ffdc3b05656628989ad00b32
|
|
After so many years of silence, we don't expect the original author to
return to the project. To make things a bit simpler for us, we convert
the coding style to what we are used to (Linux style).
The conversion was made using the 'Lindent' script which is part of the
Linux kernel.
|
|
http://www.delorie.com/gnu/docs/glibc/libc_308.html
thus reverting devname to IFNAMSIZ
and making sure (*tun)->devname[IFNAMSIZ-1] = 0;
Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
|
|
Relevant output from make:
../lib/tun.c: In function ‘tun_new’:
../lib/tun.c:688: warning: array subscript is above array bounds
Caused by assignement:
(*tun)->devname[IFNAMSIZ] = 0;
while devname defined as:
char devname[IFNAMSIZ];
Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
|
|
Some files like in sgsnemu and ggsn directory where exactly the same.
They are now moved to the same directory for easier maintenance
Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
|