Skip to content

Commit 5be75c0

Browse files
rustyrussellsangbida
authored andcommitted
Revert dev-uniform padding.
This reverts: 2252bda "connectd: gate uniform message padding behind --dev-uniform-padding" f844eb0 "lightningd: add dev-uniform-padding flag to lightningd". b7c05f6 "test: add flag to test_constant_packet_size" Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent a65c697 commit 5be75c0

File tree

8 files changed

+3
-19
lines changed

8 files changed

+3
-19
lines changed

connectd/connectd.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,7 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
16951695
&daemon->dev_no_reconnect,
16961696
&daemon->dev_fast_reconnect,
16971697
&dev_limit_connections_inflight,
1698-
&daemon->dev_keep_nagle,
1699-
&daemon->dev_uniform_padding)) {
1698+
&daemon->dev_keep_nagle)) {
17001699
/* This is a helper which prints the type expected and the actual
17011700
* message, then exits (it should never be called!). */
17021701
master_badmsg(WIRE_CONNECTD_INIT, msg);
@@ -2532,7 +2531,6 @@ int main(int argc, char *argv[])
25322531
daemon->dev_exhausted_fds = false;
25332532
daemon->dev_lightningd_is_slow = false;
25342533
daemon->dev_keep_nagle = false;
2535-
daemon->dev_uniform_padding = false;
25362534
/* We generally allow 1MB per second per peer, except for dev testing */
25372535
daemon->gossip_stream_limit = 1000000;
25382536
daemon->incoming_stream_limit = 1000000;

connectd/connectd.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,6 @@ struct daemon {
320320
/* Allow localhost to be considered "public", only with --developer */
321321
bool dev_allow_localhost;
322322

323-
/* Pad outgoing messages to uniform 1460-byte segments (traffic analysis defence) */
324-
bool dev_uniform_padding;
325-
326323
/* How much to gossip allow a peer every second (bytes) */
327324
size_t gossip_stream_limit;
328325

connectd/connectd_wire.csv

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ msgdata,connectd_init,dev_no_reconnect,bool,
2929
msgdata,connectd_init,dev_fast_reconnect,bool,
3030
msgdata,connectd_init,dev_limit_connections_inflight,bool,
3131
msgdata,connectd_init,dev_keep_nagle,bool,
32-
# Pad outgoing messages to uniform 1460-byte segments (traffic analysis defence)
33-
msgdata,connectd_init,dev_uniform_padding,bool,
3432

3533
# Connectd->master, here are the addresses I bound, can announce.
3634
msgtype,connectd_init_reply,2100

lightningd/connect_control.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,7 @@ int connectd_init(struct lightningd *ld)
727727
!ld->reconnect,
728728
ld->dev_fast_reconnect,
729729
ld->dev_limit_connections_inflight,
730-
ld->dev_keep_nagle,
731-
ld->dev_uniform_padding);
730+
ld->dev_keep_nagle);
732731

733732
subd_req(ld->connectd, ld->connectd, take(msg), -1, 0,
734733
connect_init_done, NULL);

lightningd/lightningd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
150150
ld->dev_strict_forwarding = false;
151151
ld->dev_limit_connections_inflight = false;
152152
ld->dev_keep_nagle = false;
153-
ld->dev_uniform_padding = false;
154153

155154
/*~ We try to ensure enough fds for twice the number of channels
156155
* we start with. We have a developer option to change that factor

lightningd/lightningd.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,6 @@ struct lightningd {
369369
/* Tell connectd we don't want TCP_NODELAY */
370370
bool dev_keep_nagle;
371371

372-
/* Pad outgoing messages to uniform 1460-byte segments (traffic analysis defence) */
373-
bool dev_uniform_padding;
374-
375372
/* tor support */
376373
struct wireaddr *proxyaddr;
377374
bool always_use_proxy;

lightningd/options.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -952,10 +952,6 @@ static void dev_register_opts(struct lightningd *ld)
952952
opt_set_bool,
953953
&ld->dev_keep_nagle,
954954
"Tell connectd not to set TCP_NODELAY.");
955-
clnopt_noarg("--dev-uniform-padding", OPT_DEV,
956-
opt_set_bool,
957-
&ld->dev_uniform_padding,
958-
"Pad all outgoing peer messages to uniform 1460-byte segments");
959955
/* This is handled directly in daemon_developer_mode(), so we ignore it here */
960956
clnopt_noarg("--dev-debug-self", OPT_DEV,
961957
opt_ignore,

tests/test_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4823,7 +4823,7 @@ def test_constant_packet_size(node_factory, tcp_capture):
48234823
Test that TCP packets between nodes are constant size. This will be skipped unless
48244824
you can run `dumpcap` (usually means you have to be in the `wireshark` group).
48254825
"""
4826-
l1, l2, l3, l4 = node_factory.get_nodes(4, opts={'dev-uniform-padding': None})
4826+
l1, l2, l3, l4 = node_factory.get_nodes(4)
48274827

48284828
# Encrypted setup BOLT 8 has some short packets.
48294829
l1.connect(l2)

0 commit comments

Comments
 (0)