Commit 34e71fea authored by Karsten Keil's avatar Karsten Keil Committed by Iustin Pop
Browse files

Fix compatibility with DRBD 8.2



This patch adds (and suppresses) the extra ipv4/ipv6 words before the
actual address that newer DRBD versions add.

[iustin@google.com: slightly changed the patch to conform to style
guide, and changed the commit message]
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent c803b052
......@@ -896,8 +896,10 @@ class DRBD8(BaseDRBD):
# value types
value = pyp.Word(pyp.alphanums + '_-/.:')
quoted = dbl_quote + pyp.CharsNotIn('"') + dbl_quote
addr_port = (pyp.Word(pyp.nums + '.') + pyp.Literal(':').suppress() +
number)
addr_type = (pyp.Optional(pyp.Literal("ipv4")).suppress() +
pyp.Optional(pyp.Literal("ipv6")).suppress())
addr_port = (addr_type + pyp.Word(pyp.nums + '.') +
pyp.Literal(':').suppress() + number)
# meta device, extended syntax
meta_value = ((value ^ quoted) + pyp.Literal('[').suppress() +
number + pyp.Word(']').suppress())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment