mptcp: fullmesh: Display addresses in /proc/net/mptcp_fullmesh

That way we know for sure what the pm has recorded in its list.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: Add some debug-statements

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: olia: Fix possible integer overflow

Multiplying two 32-bit integers (even if they are stored in a 64-bit
int) will be doing 32-bit arithmetic and only then will be cast to
64-bit.
So, we need to explicitly cast beforehand.

Fixes: 514e1d11669c9 (Initial OLIA-implementation)
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: Handle get_local_id returning -1 correctly

mtreq->loc_id is a u8, so it can never be equal to -1. We must store the
result of get_local_id in a temporary local signed integer to handle the
-1 case.

Fixes: 75ec81a35c2e0 (mptcp: Fix Bug #41: Handle missing entries in the fullmesh-path-manager)
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: Optimize mptcp_queue_skb

copied_early is only set if CONFIG_NET_DMA (broken btw) is set. So, we
can add a wrapper around the if.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: fullmesh: Check for event in mptcp_pm_inet_addr_event

When coming from netdev_event, we check for the event if it is one of
the 3 supported types.

But, we may also come directly from
mptcp_pm_inet_addr_event/inet6_addr_event from the addr_event notifier.
So, we need to check there again for the event-type.

We leave the check in netdev_event, because it allows us to exit early
in case of untracked events.

Fixes: c31d21d039d80 (Modularize the path-manager)
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: Correctly free resources in mptcp_alloc_mpcb

wmem_alloc is initialized to 0 thanks to __GFP_ZERO at allocation-time.
But, sk_free does an atomic_dec on wmem_alloc to check if it should free
the resources. So, we must force wmem_alloc to 1, so that it actually
gets free'd correctly.

Fixes: 7aecba1212a62 (Let the app talk to the meta-sk)
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: fullmesh: Modify existing event if modifying the interface

We may get a NETDEV_CHANGE right after a delete. In this case, in the
event-queue we should change the DEL to a MOD.

Reported-by: Niels Laukens <niels.laukens@innovatie.vrt.be>
Fixes: a6f8c5ab66c (mptcp: Handle address-events differently)
Tested-by: Niels Laukens <niels.laukens@innovatie.vrt.be>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>