mirror of https://github.com/libp2p/go-libp2p.git
Browse Source
Android doesn't allow netlink_xfrm & netlink_nflog in his base policy in enforce
mode. (see [here](3aa1c1725e/public/app.te (396)))
this cause a _permission denied_ when NewTransport method is called on android,
however it's look like that only *netlink route* is needed, so we just have to limit netlink
families support on android build to NETLINK_ROUTE only when netlink.NewHandle is called.
pull/1424/head
Guilhem Fanton
5 years ago
3 changed files with 17 additions and 1 deletions
@ -0,0 +1,8 @@ |
|||
// +build android
|
|||
|
|||
package libp2pquic |
|||
|
|||
import "golang.org/x/sys/unix" |
|||
|
|||
// Android doesn't allow netlink_xfrm and netlink_netfilter in his base policy
|
|||
var SupportedNlFamilies = []int{unix.NETLINK_ROUTE} |
@ -0,0 +1,8 @@ |
|||
// +build !android
|
|||
|
|||
package libp2pquic |
|||
|
|||
import "github.com/vishvananda/netlink/nl" |
|||
|
|||
// nl.SupportedNlFamilies is the default netlink families used by the netlink package
|
|||
var SupportedNlFamilies = nl.SupportedNlFamilies |
Loading…
Reference in new issue