summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trafgen_l2.c2
-rw-r--r--trafgen_l3.c2
-rw-r--r--trafgen_proto.c3
3 files changed, 3 insertions, 4 deletions
diff --git a/trafgen_l2.c b/trafgen_l2.c
index e6c5b59..316d236 100644
--- a/trafgen_l2.c
+++ b/trafgen_l2.c
@@ -31,7 +31,7 @@ static uint16_t pid_to_eth(enum proto_id pid)
case PROTO_VLAN:
return ETH_P_8021Q;
default:
- panic("eth: Not supported protocol id %u\n", pid);
+ bug();
}
}
diff --git a/trafgen_l3.c b/trafgen_l3.c
index 0e923e0..88766ea 100644
--- a/trafgen_l3.c
+++ b/trafgen_l3.c
@@ -76,7 +76,7 @@ static void ipv4_set_next_proto(struct proto_hdr *hdr, enum proto_id pid)
ip_proto = IPPROTO_TCP;
break;
default:
- panic("ipv4: Not supported protocol id %u\n", pid);
+ bug();
}
proto_field_set_default_u8(hdr, IP4_PROTO, ip_proto);
diff --git a/trafgen_proto.c b/trafgen_proto.c
index d0b5580..e3704d8 100644
--- a/trafgen_proto.c
+++ b/trafgen_proto.c
@@ -128,8 +128,7 @@ struct proto_hdr *proto_header_init(enum proto_id pid)
struct proto_hdr *hdr = proto_header_by_id(pid);
struct proto_hdr *new_hdr;
- if (headers_count >= PROTO_MAX_LAYERS)
- panic("Too many proto headers\n");
+ bug_on(headers_count >= PROTO_MAX_LAYERS);
new_hdr = xmalloc(sizeof(*new_hdr));
memcpy(new_hdr, hdr, sizeof(*new_hdr));