summaryrefslogtreecommitdiff
path: root/interface-ip.c
Commit message (Collapse)AuthorAgeFilesLines
...
* interface-ip: Remove table specific nw rules for IPv4/6 addressesHans Dedecker2015-09-291-24/+4
|
* interface-ip: Re-enable iif lo policy rules after main table lookupHans Dedecker2015-09-291-1/+22
|
* interface-ip: Support source ip rule updates when reloadingHans Dedecker2015-09-291-13/+33
|
* interface-ip: Fix broadcast address when using /31 or /32 IPv4 addressingBaptiste Jonglez2015-09-261-5/+11
| | | | | | | | | | | | A /31-addressed interface requires a broadcast address of 255.255.255.255, because there is no room for a proper broadcast address. Without this, any packet destinated to the other end of the link is sent as broadcast, which is incorrect. For consistency with the Linux kernel, /32-addressed interfaces are treated in the same way. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
* netifd: Prevent flapping IPv6 routesKristian Evensen2015-09-211-1/+1
| | | | | | | | | | | | | | Comparing valid_until will always return false as the value is updated for each route update message. This causes IPv6 routes to jump more around than House of Pain, which might have undesirable consequences for user-space and user-space applications. Removing the valid_until comparison when setting keep fixes this problem, and seems to have no side-effects. I am no IPv6 expert, but I see that valid of the route is updated correctly and route is deleted if I block the route update messages. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* interface-ip: Set route table when enabling interface ip settingsHans Dedecker2015-09-101-0/+9
| | | | | | | Routes are now inserted in the correct routing table when interface ip4table and/or ip6table was changed during interface_change_config Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* interface-ip: Don't create ip network rule if address mask is equal to full maskHans Dedecker2015-09-101-4/+8
| | | | | | Prevents the creation of identical address and network IP rules Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* interface-ip: Insert network and address ip rules for external addresses as wellHans Dedecker2015-09-101-10/+13
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* interface-ip: Remove ip loop policy rules as kernel issue is fixedHans Dedecker2015-09-101-22/+1
| | | | | | | Remove ip loop policy rules as workaround for the kernel using unspecified address to lookup locally originating traffic is fixed by http://lkml.iu.edu/hypermail/linux/kernel/1505.0/03094.html Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Add mtu6 option to override IPv6 MTUSteven Barth2015-06-241-4/+5
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* linux: more IPv6 onlink-route handling fixes / improvementsSteven Barth2015-05-261-17/+10
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* ipv6: use kernel >= 3.14 handling of offlink-addressesSteven Barth2015-05-191-9/+9
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Make interface identifier of delegated IPv6 address configurableHans Dedecker2015-01-191-3/+63
| | | | | | | | | | | | | The ip6ifaceid UCI interface parameter makes the interface identifier of the delegated IPv6 address configurable. The parameter can have the following values: eui64 : Interface identifier is generated from the interface's MAC address random : Interface identifier is generated randomly fixed value : Interface identifier is a fixed value (eg ::1:2) The latter is the default value with a fixed value of ::1 for backwards compatibility Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Joeri Barbarien <joeri.barbarien@gmail.com>
* netifd : Apply interface metric on subnet routes when reloading ipHans Dedecker2014-10-241-3/+9
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ipv6: work around kernel on-link handling issueSteven Barth2014-09-081-1/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* ipv6: assign prefixes with length <64 with /64 on-link routesSteven Barth2014-08-131-1/+23
| | | | | | | on-link routes for prefixes bigger than /64 make no sense and might confuse some users Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: fix incorrect number of bytes memset in clear_if_addrHans Dedecker2014-08-051-2/+2
| | | | | | Fix clear_if_addr for IPv6 addresses as an incorrect number of bytes were memset due to wrong sizeof argument Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* interface: don't store table id in route if the default table is usedSteven Barth2014-06-201-0/+4
| | | | | | | | | | | Use system_is_default_rt_table() to test whether the resolved routing table is the default one, in this case do not apply the table attribute to the route object. This is needed for backwards compatibility - only routes using a non-default table shall report it in the ifstatus output. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* netifd: Route type supportHans Dedecker2014-06-181-2/+12
| | | | | | | | Patch adds route type support in netifd by means of the route parameter type. By default the route type was unicast; the parameter adss support for local/broadcast/multicast/unicast routes which will be put into the appropriate routing table. If route type parameter is unset the route type will be unicast as before. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Add support for onlink-flags for IPv4 routesSteven Barth2014-06-101-0/+5
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Effectively apply configured route mtuHans Dedecker2014-05-091-1/+1
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Remove useless route table parameter check in update_proto_routeHans Dedecker2014-05-091-1/+1
| | | | | | Not necessary since route table parameter is used as key element in route_cmp Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Don't assume routes are always applied in all casesHans Dedecker2014-05-091-3/+6
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* interface-ip: fix misuse of IN6_IS_ADDR_LINKLOCAL on a netifd specific unionFelix Fietkau2014-04-291-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: Check rt_table parameter when comparing routesHans Dedecker2014-04-261-0/+3
| | | | | | Allows to add identical routes in different routing tables Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Set prefix assignment enabled if the prefix adress can be installedHans Dedecker2014-04-241-2/+2
| | | | | | | No need to install policy routes if the prefix address cannot be installed; clean up of the policy routes and the prefix address only needs to happen when the prefix assignment was active. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: fix IPv6 Link-local DNS serverUlrich Weber2014-04-241-4/+8
| | | | | | | interface name must be added to Link-local IPv6 DNS servers, otherwise they are unusable. Signed-off-by: Ulrich Weber <uw@ocedo.com>
* netifd: Assign interface metric to route metric when route is createdHans Dedecker2014-03-111-4/+2
| | | | | | | Interface metric needs to be assigned to the route metric parameter at route creation time. Otherwise if the interface metric is different from 0 route_cmp will wrongly conclude the routes are different. In this case the route will be added/deleted and could end up with the route missing in the kernel depending on the add/delete order. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Don't always assume routes & addresses are appliedSteven Barth2014-02-261-4/+6
| | | | | | Actually check netlink return values and remember failure. Signed-off-by: Steven Barth <steven@midlink.org>
* IPv6: work around dangling routes kernel issueSteven Barth2014-02-161-0/+1
|
* Fix source-restrictions of routes when no mask was providedSteven Barth2014-02-141-2/+2
|
* Don't add unnecessary NOP policy rulesSteven Barth2014-01-201-15/+22
|
* Add indicator-flags to ubus and hotplug update-eventsSteven Barth2014-01-171-0/+10
|
* IPv6: Remove IPv6 source-routing workaround (kernel is fixed)Steven Barth2013-12-111-74/+3
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Routing table parameter needs to be checked in route updateHans Dedecker2013-12-081-1/+2
| | | | | | | | Routing table parameter needs to be checked in interface_update_proto_route; a route which has an identical nexthop but a different routing table needs to be deleted and added in the correct routing table. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* IPv6: add class support to regular IPv6 addressesSteven Barth2013-11-271-0/+1
|
* utils: add a function for checking if a process given by pid is still aliveFelix Fietkau2013-10-221-1/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Add option "delegate" to toggle prefix delegationSteven Barth2013-10-181-3/+6
|
* Add source-restricted routesSteven Barth2013-10-181-13/+112
|
* Don't delete / readd IP addresses when only their lifetime has changedSteven Barth2013-10-011-10/+15
|
* IPv6: fix prefix assignment with continuous hintsSteven Barth2013-07-161-1/+1
|
* IPv6: Reverse assignment sorting orderSteven Barth2013-06-171-1/+1
|
* IPv6: Satisfy unhinted assignments ordered by prefix lengthSteven Barth2013-06-171-1/+10
|
* config: use the new uci_blob library codeFelix Fietkau2013-06-101-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* IPv6: Improve source-routing policiesSteven Barth2013-06-031-27/+53
| | | | | | * Set a default policy-failed rule per prefix (based on a patch by Jonas Gorski) * Use input interface in addition to source for filtering * Avoid duplicate routing policies
* IPv6: fix device_prefix vlist_key to not include prefix classSteven Barth2013-05-311-1/+1
|
* IPv6: reorganize prefix assignmentSteven Barth2013-05-301-7/+28
| | | | | * put parameters in a more suitable place * add support for prefix classes
* IPv6: Log a warning if users have prefixes but haven't assigned themSteven Barth2013-05-301-0/+10
|
* IPv6: remove ULA prefix-trigger (unused)Steven Barth2013-05-291-39/+0
|
* IPv6: fix wrap-arounds in address lifetimesSteven Barth2013-05-281-2/+7
|