diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-01-03 09:58:37 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-01-03 16:11:49 +0100 |
| commit | 21d4f173c5288839678ad62eddc1ed0586ddce6c (patch) | |
| tree | ca26d404d506400db35946e5347ea89bec3d71be /prog/size.go | |
| parent | 7e52950696f644435f8c5c34470514a80db79417 (diff) | |
sys/linux: improve ipv4/ipv6 vnet descriptions
1. Use optional[T] instead of array[T, 0:1].
2. Deduplicate 3 copies of ARP packet.
3. Deduplicate IPOPT_LSRR/IPOPT_SSRR/IPOPT_RR.
4. More precise description of IPOPT_TIMESTAMP/IPOPT_LSRR/IPOPT_SSRR/IPOPT_RR.
5. Don't use IPOPT_END/IPOPT_NOOP in generic option (they have different format).
6. Restrict cipso doi values.
7. Fix IPOPT_RA value type (int16 instead of int32).
8. Match ipv4/ipv6 packet type with payload.
9. Prefer 0 frag_off for ipv4 packets (they are extremely hard to get right).
Diffstat (limited to 'prog/size.go')
| -rw-r--r-- | prog/size.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/prog/size.go b/prog/size.go index 2ebf9fc29..8f7f15d4e 100644 --- a/prog/size.go +++ b/prog/size.go @@ -5,7 +5,6 @@ package prog import ( "fmt" - "strings" ) const ( @@ -70,12 +69,7 @@ func (target *Target) assignSize(dst *ConstArg, pos Arg, path []string, args []A return } for buf := parentsMap[pos]; buf != nil; buf = parentsMap[buf] { - parentName := buf.Type().Name() - if pos := strings.IndexByte(parentName, '['); pos != -1 { - // For template parents, strip arguments. - parentName = parentName[:pos] - } - if elem != parentName { + if elem != buf.Type().TemplateName() { continue } if len(path) == 0 { |
