Skip to content

Commit 40a75f2

Browse files
authored
minor ops fixes and convenience changes (#191)
1 parent 4695a77 commit 40a75f2

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

docker/docker-compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ services:
2020
- /var/lib/conjure:/var/lib/conjure # config
2121
logging:
2222
driver: "journald"
23+
options:
24+
tag: "{{.Name}}"
25+
container_name: zbalance
2326
restart: "always"
2427
command: [ "/opt/conjure/scripts/start_zbalance_ipc.sh" ]
2528

@@ -39,6 +42,7 @@ services:
3942
- /dev/net/tun:/dev/net/tun #tun driver interface
4043
- /dev/hugepages:/dev/hugepages # zbalance_ipc
4144
- /var/lib/conjure:/var/lib/conjure # config
45+
container_name: conjure-det
4246
command:
4347
[
4448
"bash",
@@ -55,6 +59,7 @@ services:
5559
- /dev/hugepages:/dev/hugepages # zbalance_ipc
5660
- /var/lib/conjure:/var/lib/conjure # config
5761
- /usr/share/GeoIP:/usr/share/GeoIP # geoip database
62+
container_name: conjure-app
5863
command:
5964
[
6065
"bash",

src/process_packet.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,6 @@ impl PerCoreGlobal {
300300
zmq_msg.set_decoy_address(decoy);
301301
zmq_msg.set_registration_address(src);
302302

303-
let repr_str = hex::encode(res.0);
304-
debug!("New registration {}, {}", flow, repr_str);
305-
306303
let zmq_payload = match zmq_msg.write_to_bytes() {
307304
Ok(b) => b,
308305
Err(e) => {

src/sessions.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,6 @@ impl SessionTracker {
287287
// Dark Decoys Map is not sorted by timeout, so need to check all
288288
map.retain(|_, v| (*v > right_now));
289289
let num_sessions_after = map.len();
290-
if num_sessions_before != num_sessions_after {
291-
debug!(
292-
"Dark Decoys drops: {} - > {}",
293-
num_sessions_before, num_sessions_after
294-
);
295-
}
296290
num_sessions_before - num_sessions_after
297291
}
298292

sysconfig/conjure.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ get_ifc_and_driver() {
117117
# FIXME: Full path to these commands?
118118
# Use ifconfig with -a to check down interfaces too
119119
# for CJ_IFACE in $(ifconfig | grep ^e | awk '{print $1}'); do
120-
for CJ_IFACE in $(ifconfig -a | grep ^e | awk '{print $1}'); do
120+
# for CJ_IFACE in $(ifconfig -a | grep ^e | awk '{print $1}'); do
121+
for CJ_IFACE in $(/bin/ls /sys/class/net); do
121122
# Need additional checks to find the "right" device
122123
# Here we require it have no ipv4 address, be Ethernet, and be "RUNNING" per ifconfig
123124
# As well as using one of the 2 supported drivers.
124125
export CJ_IFACE
125-
if ! ifconfig $CJ_IFACE | grep -q "inet\s"; then
126+
if ! ip addr l $CJ_IFACE | grep -q "inet\s"; then
126127
# Ensure Link encap:Ethernet? (has that in ifconfig)
127128
if ip addr l $CJ_IFACE | grep -q "link/ether"; then
128129
# In general, can't do any more tests.

0 commit comments

Comments
 (0)