The android policy routing system does insane things.
-// +build !linux
+// +build !linux android
/* SPDX-License-Identifier: GPL-2.0
*
var fwmarkIoctl int
func init() {
- if runtime.GOOS == "freebsd" {
+ switch runtime.GOOS {
+ case "linux", "android":
+ fwmarkIoctl = 36 /* unix.SO_MARK */
+ case "freebsd":
fwmarkIoctl = 0x1015 /* unix.SO_USER_COOKIE */
- } else if runtime.GOOS == "openbsd" {
+ case "openbsd":
fwmarkIoctl = 0x1021 /* unix.SO_RTABLE */
}
}
+// +build !android
+
/* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2017-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.