aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/amd64.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-02-17 16:47:00 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-02-17 19:02:12 +0100
commitd21a39fc48c781b8bc818b537ed4bf495d5daa89 (patch)
tree9ba98bafaff86f22e16ddbe7d29055a0f2cbcf40 /sys/linux/amd64.go
parent29d7cb9a1661be49bc768fd139682e6b4aacc506 (diff)
sys/linux: fixes for network descriptions
1. Fix connlimit netfilter match version. 2. Fix xt_time_info layout. 3. Introduce mac_addr_mask type. 4. Limit vlan id's for better matches between them.
Diffstat (limited to 'sys/linux/amd64.go')
-rw-r--r--sys/linux/amd64.go24
1 files changed, 13 insertions, 11 deletions
diff --git a/sys/linux/amd64.go b/sys/linux/amd64.go
index 5b4b00ac1..88929a3a4 100644
--- a/sys/linux/amd64.go
+++ b/sys/linux/amd64.go
@@ -232,7 +232,7 @@ var structDescs_amd64 = []*KeyedStruct{
&UnionType{Key: StructKey{Name: "mac_addr"}, FldName: "mac"},
}}},
{Key: StructKey{Name: "arpt_devmask"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arpt_devmask", TypeSize: 16}, Fields: []Type{
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mac", TypeSize: 6}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arpt_devmask_vals", TypeSize: 1}}, Vals: []uint64{0, 255}}, Kind: 1, RangeBegin: 6, RangeEnd: 6},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mac", TypeSize: 6}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mac_addr_mask_vals", TypeSize: 1}}, Vals: []uint64{0, 255}}, Kind: 1, RangeBegin: 6, RangeEnd: 6},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pad", TypeSize: 10}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 10, RangeEnd: 10},
}}},
{Key: StructKey{Name: "arpt_entry"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arpt_entry", IsVarlen: true}, Fields: []Type{
@@ -9527,13 +9527,13 @@ var structDescs_amd64 = []*KeyedStruct{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "tpid", TypeSize: 2}, BigEndian: true}, Val: 37120},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "pcp", TypeSize: 2}, BitfieldLen: 3, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "dei", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "vid", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 12}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "vid", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 12}, Kind: 2, RangeEnd: 4},
}}},
{Key: StructKey{Name: "vlan_tag_q"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vlan_tag_q", TypeSize: 4}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "tpid", TypeSize: 2}, BigEndian: true}, Val: 33024},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "pcp", TypeSize: 2}, BitfieldLen: 3, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "dei", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "vid", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 12}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "vid", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 12}, Kind: 2, RangeEnd: 4},
}}},
{Key: StructKey{Name: "vmaddr_cid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vmaddr_cid", TypeSize: 4}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "any", TypeSize: 4}}, Val: 4294967295},
@@ -10263,10 +10263,10 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "xt_connlabel_mtinfo"}, FldName: "data"},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
}, AlignAttr: 8}},
- {Key: StructKey{Name: "xt_entry_match[\"connlimit\", xt_connlimit_info, 0]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_entry_match[\"connlimit\", xt_connlimit_info, 0]", TypeSize: 64}, Fields: []Type{
+ {Key: StructKey{Name: "xt_entry_match[\"connlimit\", xt_connlimit_info, 1]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_entry_match[\"connlimit\", xt_connlimit_info, 1]", TypeSize: 64}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "match_size", TypeSize: 2}}, Buf: "parent"},
&BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "name", TypeSize: 29}, Kind: 2, Values: []string{"connlimit\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "revision", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "revision", TypeSize: 1}}, Val: 1},
&StructType{Key: StructKey{Name: "xt_connlimit_info"}, FldName: "data"},
}, AlignAttr: 8}},
{Key: StructKey{Name: "xt_entry_match[\"connmark\", xt_connmark_mtinfo1, 1]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_entry_match[\"connmark\", xt_connmark_mtinfo1, 1]", TypeSize: 48}, Fields: []Type{
@@ -10673,7 +10673,7 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "xt_tcpmss_match_info"}, FldName: "data"},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
}, AlignAttr: 8}},
- {Key: StructKey{Name: "xt_entry_match[\"time\", xt_time_info, 0]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_entry_match[\"time\", xt_time_info, 0]", TypeSize: 48}, Fields: []Type{
+ {Key: StructKey{Name: "xt_entry_match[\"time\", xt_time_info, 0]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_entry_match[\"time\", xt_time_info, 0]", TypeSize: 56}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "match_size", TypeSize: 2}}, Buf: "parent"},
&BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "name", TypeSize: 29}, Kind: 2, Values: []string{"time\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "revision", TypeSize: 1}}},
@@ -11500,9 +11500,11 @@ var structDescs_amd64 = []*KeyedStruct{
&UnionType{Key: StructKey{Name: "devname"}, FldName: "oif"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "priv", TypeSize: 8}}},
}}},
- {Key: StructKey{Name: "xt_time_info"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_time_info", TypeSize: 16}, Fields: []Type{
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "date_start", TypeSize: 4}}, Kind: 2, RangeEnd: 86399},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "date_stop", TypeSize: 4}}, Kind: 2, RangeEnd: 86399},
+ {Key: StructKey{Name: "xt_time_info"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "xt_time_info", TypeSize: 24}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "date_start", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "date_stop", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "daytime_start", TypeSize: 4}}, Kind: 2, RangeEnd: 86399},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "daytime_stop", TypeSize: 4}}, Kind: 2, RangeEnd: 86399},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "monthdays_match", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "weekdays_match", TypeSize: 1}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "xt_time_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2}},
@@ -11571,7 +11573,7 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "xt_entry_match[\"time\", xt_time_info, 0]"}, FldName: "time"},
&StructType{Key: StructKey{Name: "xt_entry_match[\"bpf\", xt_bpf_info, 0]"}, FldName: "bpf0"},
&StructType{Key: StructKey{Name: "xt_entry_match[\"bpf\", xt_bpf_info_v1, 1]"}, FldName: "bpf1"},
- &StructType{Key: StructKey{Name: "xt_entry_match[\"connlimit\", xt_connlimit_info, 0]"}, FldName: "connlimit"},
+ &StructType{Key: StructKey{Name: "xt_entry_match[\"connlimit\", xt_connlimit_info, 1]"}, FldName: "connlimit"},
&StructType{Key: StructKey{Name: "xt_entry_match[\"conntrack\", xt_conntrack_mtinfo1, 1]"}, FldName: "conntrack1"},
&StructType{Key: StructKey{Name: "xt_entry_match[\"conntrack\", xt_conntrack_mtinfo2, 2]"}, FldName: "conntrack2"},
&StructType{Key: StructKey{Name: "xt_entry_match[\"conntrack\", xt_conntrack_mtinfo3, 3]"}, FldName: "conntrack3"},
@@ -24681,4 +24683,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_amd64 = "ab5783fcd120df92e4da46e596012bcec508aa0d"
+const revision_amd64 = "54bb54ead4b62281da500ec1751ca2932e1441f4"