BOLTs: catchup with "Drop the required channel_update in failure onions".
Not much difference for us. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
2
Makefile
2
Makefile
@@ -26,7 +26,7 @@ CCANDIR := ccan
|
||||
|
||||
# Where we keep the BOLT RFCs
|
||||
BOLTDIR := ../bolts/
|
||||
DEFAULT_BOLTVERSION := 5dd9d9cd5fa9bc928c0fd47602ee84b7a15822a9
|
||||
DEFAULT_BOLTVERSION := 93b7ee031b50acd59967a105f1326176a37628f9
|
||||
# Can be overridden on cmdline.
|
||||
BOLTVERSION := $(DEFAULT_BOLTVERSION)
|
||||
|
||||
|
||||
@@ -564,7 +564,18 @@ static void rcvd_htlc_reply(struct subd *subd, const u8 *msg, const int *fds UNU
|
||||
}
|
||||
|
||||
if (tal_count(failmsg)) {
|
||||
/* It's our job to append the channel_update */
|
||||
/* BOLT #4:
|
||||
* The `channel_update` field used to be mandatory in messages
|
||||
* whose `failure_code` includes the `UPDATE` flag. However,
|
||||
* because nodes applying an update contained in the onion to
|
||||
* their gossip data is a massive fingerprinting
|
||||
* vulnerability, the `channel_update` field is no longer
|
||||
* mandatory and nodes are expected to transition away from
|
||||
* including it. Nodes which do not provide a `channel_update`
|
||||
* are expected to set the `channel_update` `len` field to
|
||||
* zero.
|
||||
*/
|
||||
/* We still append the channel_update (if we have one!) FIXME: provide an option? */
|
||||
if (fromwire_peektype(failmsg) & UPDATE) {
|
||||
const u8 *update = channel_update_for_error(tmpctx, hout->key.channel);
|
||||
towire(&failmsg, update, tal_bytelen(update));
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* * 0x8000 (BADONION): unparsable onion encrypted by sending peer
|
||||
* * 0x4000 (PERM): permanent failure (otherwise transient)
|
||||
* * 0x2000 (NODE): node failure (otherwise channel)
|
||||
* * 0x1000 (UPDATE): new channel update enclosed
|
||||
* * 0x1000 (UPDATE): channel forwarding parameter was violated
|
||||
*/
|
||||
#define BADONION 0x8000
|
||||
#define PERM 0x4000
|
||||
|
||||
Reference in New Issue
Block a user