summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
Diffstat (limited to 'packet')
-rw-r--r--packet/mrt.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet/mrt.go b/packet/mrt.go
index ba7dfa06..7c336684 100644
--- a/packet/mrt.go
+++ b/packet/mrt.go
@@ -700,7 +700,7 @@ func (m *BGP4MPMessage) String() string {
if m.isLocal {
title += "_LOCAL"
}
- return fmt.Sprintf("%s: PeerAS [%d] LocalAS [%d] InterfaceIndex [%d] PeerIP [%s] LocalIP [%s] BGPMessage [%s]", title, m.PeerAS, m.LocalAS, m.InterfaceIndex, m.PeerIpAddress, m.LocalIpAddress, m.BGPMessage.String())
+ return fmt.Sprintf("%s: PeerAS [%d] LocalAS [%d] InterfaceIndex [%d] PeerIP [%s] LocalIP [%s] BGPMessage [%v]", title, m.PeerAS, m.LocalAS, m.InterfaceIndex, m.PeerIpAddress, m.LocalIpAddress, m.BGPMessage)
}
//This function can be passed into a bufio.Scanner.Split() to read buffered mrt msgs
@@ -746,7 +746,7 @@ func ParseMRTBody(h *MRTHeader, data []byte) (*MRTMessage, error) {
rf = RF_IPv6_MC
case RIB_GENERIC:
default:
- return nil, fmt.Errorf("unsupported table dumpv2 subtype: %s\n", subType.String())
+ return nil, fmt.Errorf("unsupported table dumpv2 subtype: %v\n", subType)
}
if subType != PEER_INDEX_TABLE {
@@ -781,10 +781,10 @@ func ParseMRTBody(h *MRTHeader, data []byte) (*MRTMessage, error) {
isLocal: true,
}
default:
- return nil, fmt.Errorf("unsupported bgp4mp subtype: %s\n", subType.String())
+ return nil, fmt.Errorf("unsupported bgp4mp subtype: %v\n", subType)
}
default:
- return nil, fmt.Errorf("unsupported type: %s\n", h.Type.String())
+ return nil, fmt.Errorf("unsupported type: %v\n", h.Type)
}
err := msg.Body.DecodeFromBytes(data)
if err != nil {