Commit Graph

2535 Commits

Author SHA1 Message Date
Neels Hofmeyr 066473fe36 test_gsm0808_enc_dec_cell_id_list_lac(): validate encoded bytes
Change-Id: I81b1ffbe6a5ec566c112492c2cbaf99c018c45bb
2018-04-13 05:38:48 +02:00
Neels Hofmeyr 250e7f7d30 add gsm0808_{enc,dec}_cell_id
Clarify semantics and micro-optimise for the case of single Cell Identifer IEs.
Test in gsm0808_test.c

So far we have gsm0808_enc_cell_id_list2(), but there also exist instances of
single Cell Identifiers (3GPP TS 48.008 3.2.2.17).

It is possible to decode the same using the cell identifier list API, but this
forces the caller to also keep a full struct gsm0808_cell_id_list2 with all its
127 entries around.

E.g. for handover, there are two Cell Identifiers (Serving and Target); I'd
need two full cell id lists for each, and these would be dynamically allocated
for each handover operation, whether it uses them or not.

Related: OS#2283 (inter-BSC HO, BSC side)
Change-Id: I9f9c528965775698ab62ac386af0516192c4b0cc
2018-04-13 05:38:47 +02:00
Neels Hofmeyr a78b22ba20 add tlv_parse2(), capable of multiple instances of the same IE
Allow passing multiple struct tlv_parsed in an array, to allow parsing as many
repeated IEs as are expected by the caller.

From tlv_parse(), call tlv_parse2() with dec_multiple = 1 to yield the previous
behavior. tlv_parse() remains valid API.

An example of multiple IEs is the BSSMAP Handover Request, containing Cell
Identifier (Serving) and Cell Identifier (Target), both defined by 3GPP TS
48.008 3.2.2.17 with identical IE tags; both are mandatory.

Related: OS#2283 (inter-BSC HO, BSC side)
Change-Id: Id04008eaf0a1cafdbdc11b7efc556e3035b1c84d
2018-04-13 05:28:09 +02:00
Neels Hofmeyr 74663d97c6 add gsm0808_cell_id_list_add() to combine two cell identifier lists
This will be used by the upcoming neighbor_ident API in osmo-bsc, where the vty
interface allows composing neihbor BSS cell identifier lists, and we want to
allow adding individual items from individual user commands.

It will also be useful to accumulate cell identifiers in case a subscriber sees
multiple alternative cells from a neighboring BSS, and we want to pass these on
to the MSC in a Handover Required.

Related: OS#2283 (inter-BSC HO, BSC side)
Change-Id: I5781f5fa5339c92ab2e2620489b002829d206925
2018-04-13 05:28:09 +02:00
Neels Hofmeyr 43496206c1 add osmo_cgi_name()
This will be used by cell idenitifier list code, like upcoming neighbor_ident
VTY in osmo-bsc and regression tests.

Change-Id: Iebc5cdf61b697b1603900993fc265af3eca0cedf
2018-04-13 05:27:02 +02:00
Pau Espin c62fc2d20f msgb: msgb_pull: Abort when pulling more than avail size
Change-Id: I512ff2035ae7a929e6c96df82938cc1ddbcc4e2a
2018-04-11 20:14:08 +02:00
Pau Espin 9fa0912e5b msgb: msgb_get: Drop unneeded tmp var
Change-Id: I27bb2ab59408c9cd1363b3b5acb2263128c55732
2018-04-11 20:09:13 +02:00
Neels Hofmeyr 4eeb808c43 avoid warning in gsm0808_create_layer3
Change-Id: Ie098af4fc9640240196eda10fd61edcb3a872455
2018-04-10 13:06:15 +02:00
Neels Hofmeyr bd6c8b5081 deprecate PLMN de-/coding functions incapable of 3-digit MNC with leading zeros
All our projects have seen patches to move to 3-digit MNC handling.

Furthermore, since our builds no longer break from deprecation warnings, I shall
no longer refrain from deprecating old API.

Change-Id: I55dfaf7ce74870de44120b26c42d45bb7b184341
2018-04-10 13:06:15 +02:00
Thorsten Alteholz cefce6688b fix issue on big endian architecture
OSMO_IS_LITTLE_ENDIAN is always defined and has a value of
either 0 or 1
as a result in byteswap.h the corresponding swap functions
will be always called, independent of the endianess

Signed-off-by: Thorsten Alteholz <osmocom@alteholz.de>
Change-Id: I4a09d2d8ccf155e70a3977ae1747758b6bc5125e
2018-04-09 17:32:11 +00:00
Neels Hofmeyr aead241df0 add gsm48_reject_value_names
There seems to be quite some confusion / overlap between enum
gsm48_reject_value, gsm48_gsm_cause and gsm48_gmm_cause. I tried to go with
gsm48_gsm_cause_names[], but e.g. GSM48_REJECT_CONGESTION is not represented.

Instead of attempting to mix/merge those enums, provide a separate value string
array for enum gsm48_reject_value.

This will be used by osmo-msc's libvlr (refactoring of FSM result handling),
I27bf8d68737ff1f8dc6d11fb1eac3d391aab0cb1.

Change-Id: I6661f139e68a498fb1bef10c266c2f064b72774a
2018-04-09 17:57:15 +02:00
Neels Hofmeyr a64c45a03e add osmo_fsm_inst_update_id_f()
In the osmo-msc, I would like to set the subscr conn FSM identifier by a string
format, to include the type of Complete Layer 3 that is taking place. I could
each time talloc a string and free it again. This API is more convenient.

From osmo_fsm_inst_update_id(), call osmo_fsm_inst_update_id_f() with "%s" (or
pass NULL).

Put the name updating into separate static update_name() function to clarify.

Adjust the error message for erratic ID: don't say "allocate", it might be from
an update. Adjust test expectation.

Change-Id: I76743a7642f2449fd33350691ac8ebbf4400371d
2018-04-09 17:57:15 +02:00
Neels Hofmeyr 6e8c088472 cosmetic: osmo_fsm_inst_update_id(): don't log "allocate"
On erratic id in osmo_fsm_inst_update_id(), don't say "Attempting to allocate
FSM instance".

Escape the invalid id using osmo_quote_str().

Change-Id: I770fc460de21faa42b403f694e853e8da01c4bef
2018-04-09 17:57:15 +02:00
Neels Hofmeyr 71f76a1f42 fsm: id: properly set name in case of NULL id
Since alloc relies on osmo_fsm_inst_update_id() to set the name, never skip
that.

In osmo_fsm_inst_alloc(), we allow passing a NULL id, and in
osmo_fsm_inst_update_id(), we set the name without id if id is NULL.

Change-Id: I6d6b09a811b82770818f19b189a57d9fc4a8133b
2018-04-09 17:57:15 +02:00
Neels Hofmeyr 975ee6bd44 fsm_test: more thoroughly test FSM inst ids and names
Place id and name testing in its separate section, test_id_api().

Add a test that actually allocates an FSM instance with a NULL id, which is
allowed, but uncovers a bug of an unset FSM instance name. osmo_fsm_inst_name()
falls back to the fsm struct's name on NULL, but osmo_fsm_inst_find_by_name()
fails to match if the instance's name is NULL (and until recently even
crashed). Show this in fsm_test.c with loud comments.

Add test to clear the id by passing NULL.

Add test for setting an empty id.

Add test for setting an invalid identifier (osmo_identifier_valid() == false).

Change-Id: I646ed918576ce196c395dc5f42a1507c52ace2c5
2018-04-09 17:57:15 +02:00
Neels Hofmeyr 2bcc873e93 osmo_fsm_inst_find_by_name(): guard against strcmp(NULL)
strcmp() *must not* be passed NULL pointers, or we hit:

../../../src/libosmocore/src/fsm.c:123:8: runtime error: null pointer passed as argument 2, which is declared to never be null
ASAN:DEADLYSIGNAL

(Or, alternatively, a segfault.)

If any of the search string or an FSM instance's name string should be NULL,
simply never match.

Technically, an FSM should never have a NULL name, but a current bug actually
allows this (pass NULL id to alloc), which will be addressed by an upcoming
patch. To test for it, we need to first make sure this here doesn't segfault.

Change-Id: I2e5f82c06d1a4727bd93e955366e3b62b2df1b32
2018-04-09 17:57:15 +02:00
Neels Hofmeyr d8f175cd2a fsm_test: terminate the main loop instead of exit on timeout
In fsm_test.c, we have FSM instance cleanup after the select main loop, but we
exit(0) in the timer cb; hence the final code is never called.

Rather clean up the instance and hence also test that, by using a global flag
to exit the main loop upon timeout.

Adjust expected stderr output.

BTW, in a subsequent commit, I want to move the fsm instance id testing to
below the main loop, to more clearly group the tested bits.

Change-Id: Ia47811ffcc1bd68d2630c86be7ab98fc1f338773
2018-04-09 17:57:15 +02:00
Neels Hofmeyr 04eb56f146 add osmo_quote_str(),osmo_quote_str_buf() and test
Rationale: with osmo_escape_str(), you get the escaped contents of the string,
but not so graceful handling of NULL strings. The caller needs to quote it, and
for NULL strings not quote it.

osmo_quote_str() is like osmo_escape_str() but always quotes a non-NULL string,
and for a NULL string returns a literal NULL, i.e. it should (tm) give the
exact C representation of a string.

That's useful in testing, to show exactly what char* situation we have, without
jumping through hoops like
  if (str)
  	printf("\"%s\"", osmo_escape_str(str, -1));
  else
  	printf("NULL");

Copy the unit test for osmo_escape_str() and adjust. To indicate that the
double quotes are returned by osmo_quote_str(), use single quotes in the test
printf()s.

I considered allowing to pick the quoting characters by further arguments, but
that complicates things: we'd need to escape the quoting characters. Just
hardcode double quotes like C.

Change-Id: I6f1b3709b32c23fc52f70ad9ecc9439c62b02a12
2018-04-09 15:56:14 +00:00
Thorsten Alteholz 5a9dbf81a2 fix spelling
fix for some spelling issues found by lintian

Signed-off-by: Thorsten Alteholz <osmocom@alteholz.de>
Change-Id: I69976ecae6939d9ff51bfe4ce7374890c6563b82
2018-04-08 19:13:25 +02:00
Neels Hofmeyr a829b45c85 use osmo_init_logging2() with proper talloc ctx
Ironically, when deprecating osmo_init_logging() in
I216837780e9405fdaec8059c63d10699c695b360, I forgot to change the callers
within libosmocore itself, i.e. in the various regression tests.

Change-Id: Ia36c248f99353d5baaa2533f46a2f60a8579bdf8
2018-04-06 04:37:50 +02:00
Pau Espin 3a32147366 socket.c: osmo_sock_init: Several logic fixes and log improvements
See explanations in previous commit.

Change-Id: I4889e777d8627fdfb52c97ab3ab353b6ed34aab2
2018-04-05 19:57:35 +00:00
Pau Espin 27cf8df024 socket.c: osmo_sock_init2: connect: Several logic fixes and log improvements
See explanations in previous commits.

Change-Id: Ib2f7577b9f498ae9d388ed1f79f6ca0ec6f09664
2018-04-05 19:57:35 +00:00
Pau Espin 5d50fa50b3 socket.c: osmo_sock_init2: bind: Several logic fixes and log improvements
After investigating osmo-msc showing this log message and looking at the
code, it's a bit difficult to find out what's going on in the code:
socket.c:224 unable to bind socket: (null):0: Protocol not supported

The root cause was not yet found, but probably SCTP is not enabled in
the kernel of the host running it.

The cod eis most probably failing during socket() and not due to bind
error as the log says, so let's print an error if socket() fails.

Then, if setsockopt fails, we want to still keep trying in case an extra
addr was offered by addrinfo_helper. It is definetly wrong to continue
if setsockopt fails, because then we are skipping the bind(), which is a
fundamental part of what osmo_sock_init2 does.

Then, let's print the bind error when it really happens, and re-write
the extra log at the end if we reach the point at which no suitable addr
is found.

Change-Id: I1854422ad92dadf33ed4d849e15c0380c3bf1626
2018-04-05 19:57:35 +00:00
Neels Hofmeyr a8b6cc4cd9 fix ctrl_test sanitizer issues
Add logging to root ctx, add msgb ctx to root ctx, free wqueue to simulate the
msgb being sent, and assert final talloc size.

Change-Id: Ief3d5e7b6c4d781b3854e230e45a67d5281b94cd
2018-04-05 18:23:45 +02:00
Neels Hofmeyr 7c0031fc80 cosmetic: flatten ctrl_handle_msg()
Change-Id: I3a711f5c974b7f56e27b333d390d1a706fb57007
2018-04-05 03:11:52 +02:00
Neels Hofmeyr cdbc9afe5d ctrl: fix deferred commands (and hence fix osmo-bts-sysmo 'clock-info' cmd)
The CTRL interface has a ctrl_cmd_def_* API that allows deferring a CTRL
command reply until later. However, the command handling currently fails to
acknowledge this and deallocates the struct ctrl_cmd anyway.

Fix: in struct ctrl_cmd, add a defer pointer to be populated by
ctrl_cmd_def_make(). A cmd thus marked as deferred is not deallocated at the
end of command handling. This fix needs no change in calling code.

(Another idea was to return a different code than CTRL_CMD_HANDLED when the
command is to be deferred, but that would require adjusting each user of
ctrl_cmd_def_make(). The implicit marking is safer and easier.)

Show that handling deferred commands is fixed by adjusting the expectations of
ctrl_test.c's test_deferred_cmd() and removing the now obsolete exit_early
label.

One symptom of the breakage is that osmo-bts-sysmo crashes when asked to report
a trx's clock-info, which is aggravated by the fact that the sysmobts-mgr does
ask osmo-bts-sysmo for a clock-info.

The crash appears since Id583b413f8b8bd16e5cf92a8a9e8663903646381 -- it looked
like just fixing an obvious memory leak, which it did as shown by the unit
test, but deferred ctrl commands actually relied on that leak. Both fixed now.

Related: OS#3120
Change-Id: I24232be7dcf7be79f4def91ddc8b8f8005b56318
2018-04-05 03:11:49 +02:00
Neels Hofmeyr 6882b80d96 ctrl: test deferred cmd, show current failure
Handling a deferred command currently deallocates the struct ctrl_cmd upon
exiting the initial command handling, while it should actually stay around for
the asynchronous/deferred handling of the ctrl command.

Show the current bug by means of a ctrl test. The test will be adjusted to
expect the correct result when the bug is fixed in a subsequent commit
(I24232be7dcf7be79f4def91ddc8b8f8005b56318).

Change-Id: Ibbc847fc583bdd8e5e53a008258805e634ea12b4
2018-04-05 03:10:34 +02:00
Vadim Yanitskiy 2ecfb30d7f gsm0480: drop messages with incorrect data length
If either an INVOKE, either a RETURN_RESULT component has the
data with incorrect length (see Annex A, 3GPP TS 04.80), the
whole message is probably incorrect.

Let's drop such messages instead of silent truncation.

Change-Id: I2a169b0b84aa26ea2521edd55ff005c27ae6d808
2018-04-04 20:24:09 +07:00
Vadim Yanitskiy a24ead0126 gsm0480: copy the raw USSD data, its DCS and length
As it was already documented before, the 'ss_request' struct has
a rudiment of deprecated 'ussd_request' struct - the 'ussd_text'
field. It represents the data either of an INVOKE component,
either of a RETURN_RESULT component, encoded as ASCII in case
if DCS is 0x0f (i.e. decoded by the code itself), otherwise
raw bytes 'as is'.

Previously, there was no possibility to distinguish between
ASCII and raw bytes with different DCS. Moreover, the payload
decoding is not desired in some cases.

Let's introduce the new fields, which will carry the raw
unmodified payload, its length and DCS (Data Coding Scheme).

Change-Id: Ia193d175021e145bb3b131290231f307dbefc64a
2018-04-04 20:22:13 +07:00
Vadim Yanitskiy 9fb7e3a9fb gsm0480: document the 'ss_request' structure
Change-Id: I22144dd759e0c1bb1965574b7ddd676606e5d6b7
2018-04-04 10:47:27 +07:00
Philipp Maier dbb7659208 gsm0808: Add value strings for BSSMAP cause codes
libosmocore has no value strings for BSSMAP cause codes yet.

- Add value strings for BSSMAP cause codes and a function
  to retrieve them

Change-Id: I313dd8d7b06374e1e35ddc18b7a42562d9e25d45
Related: OS#1609
2018-03-29 15:00:41 +02:00
Neels Hofmeyr 3d8b47fc5c fix logging talloc ctx: add osmo_init_logging2()
Deprecate osmo_init_logging() for the benefit of adding an explicit talloc
context argument to new function osmo_init_logging2().  Pass a ctx to
log_init() instead of hardcoded NULL.

Before now, *all* of our code uses a NULL ctx for logging, which amounts to
talloc "leaks" hit by address sanitizer builds on newer gcc (e.g. gcc 7.3.0 on
debian 9).

This commit helps fixing "leaks" detected in e.g. osmo-bsc unit tests by a
sanitize build with gcc (Debian 7.3.0-12) 7.3.0.

Change-Id: I216837780e9405fdaec8059c63d10699c695b360
2018-03-28 19:06:16 +02:00
Neels Hofmeyr d65f3ea18e vty/command.c: write_config_file(): sanely compose temp path
Fix GCC version 7.3.0 (Debian 7.3.0-12) compiler warning:

../../../../src/libosmocore/src/vty/command.c: In function ‘write_config_file’:
../../../../src/libosmocore/src/vty/command.c:2741:2: error: null destination pointer [-Werror=format-overflow=]
  sprintf(config_file_tmp, "%s.XXXXXX", config_file);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check agains NULL after each _talloc_zero() in write_config_file().

While at it, add a comment explaining why we don't use talloc_asprintf() instead.

Change-Id: I7bdc52afe724c1d21f419fe49a6e2ebca9420969
2018-03-28 16:19:00 +02:00
Harald Welte a2501a2065 VTY: Don't welcome the user to the "control" interface, if it's VTY
This is quite confusing, I'm surprised that it has not been flagged
before...

Change-Id: I3dc07290579949891e481675d493e5a2ea6d0aed
2018-03-27 07:21:46 +00:00
Neels Hofmeyr 71f781c303 contrib/fsm-to-dot: warn about identically named FSMs
FSMs with identical names confuse the script, so at least warn about them.
IMHO we should also have different names for each FSM, so not bothering to make
the script safe against identical naming.

Change-Id: I4fe7e85d2fdf23e2ba964f3b47be1954edc63cef
2018-03-26 15:04:32 +02:00
Neels Hofmeyr 338d174399 contrib/fsm-to-dot: mark illegal states in red
If an FSM transitions to a state that actually belongs to a different FSM,
print an error and mark it red, instead of exiting with exception.

Change-Id: I73d95a0c65ca1ea586ad55234610671a53d6220f
2018-03-26 15:04:18 +02:00
Neels Hofmeyr ec0f334e99 contrib/fsm-to-dot: less false positives on event parsing
Do some more mad hacking to only detect event triggers if event names actually
appear in if() or case: statements. Also combine events in consecutive 'case'
statements.

When will this madness stop?

Change-Id: Iabaaab57f0d1687607eaaa4e09c7c2439fbd7a25
2018-03-26 13:03:20 +00:00
Neels Hofmeyr 536534a62f contrib/fsm-to-dot: mark arrows that feed events
Most arrows draw state transitions, but some want to show that an event is
delivered to a state. Mark those with a "halfopen" arrow head.

Change-Id: Ib07380894a6d513896c9135f175ecbf653a23eec
2018-03-26 13:03:20 +00:00
Neels Hofmeyr 75ee4e8aa9 contrib/fsm-to-dot: add default edge label '-'
When some edges have no label, it is sometimes hard to interpret which label
belongs to which edge. Adding a '-' default label clarifies the edge labeling.

Change-Id: I3a10b615288107e8fc12ffdbbe0099cf51abe94f
2018-03-26 13:03:20 +00:00
Neels Hofmeyr fcf79926e5 contrib/fsm-to-dot: warn and draw unallowed state transitions
Hacked as it is, fsm-to-dot is capable of detecting action functions
transitioning to states that are not allowed according to the FSM definition
struct.

Draw those in red and output a warning.

Found these osmo-bsc gscon errors with this patch:

ERROR: gscon_fsm_active() triggers a transition to ST_WAIT_HO_COMPL, but this is not allowed by the FSM definition
ERROR: gscon_fsm_wait_ho_compl() triggers a transition to ST_WAIT_MDCX_BTS_HO, but this is not allowed by the FSM definition

Related: OS#3109
Change-Id: Ic6319a958b3c7247510c1930bac8b02b95f9dcf2
2018-03-26 13:03:19 +00:00
Neels Hofmeyr bb22df3db9 contrib/fsm-to-dot: don't match on event names in comments
Strip comments from function bodies before matching on event names.

In osmo-bsc's gscon FSM, there often are event names in comments. The naive
parsing of fsm-to-dot.py mistakes these as events causing state transitions,
but the comments are just explaining how states interact.

Makes me reconsider parsing the C with clang instead, but I got away with a
dirty hack once more.

Change-Id: I56d70ae14d363f7ca655dced16d93d795b3f940d
2018-03-26 13:03:19 +00:00
Neels Hofmeyr 46145e80ec contrib/fsm-to-dot: allow transition from and to the same state
In osmo-bsc's new gscon FSM, there is an osmo_fsm_inst_state_chg() from
ST_ACTIVE to ST_ACTIVE. Avoid an exception triggering on this simple fact.

Change-Id: I420c7be84e3af555cc5e8bddbff7261013348375
2018-03-26 13:03:19 +00:00
Neels Hofmeyr 167f808d76 contrib/fsm-to-dot: add -h option to print basic instructions
Change-Id: I196033e44d50ebb73cf9b44cbdc94a2b8b4f98ce
2018-03-26 13:03:19 +00:00
Neels Hofmeyr 21946e8f5d cosmetic: gsm0808_test: drop extraneous assertion
Recent commit I77cd4b9142510c6914298b720d9c19ab68f9ebef left an obsolete
assertion around. It is already done in the if-body now.

Change-Id: I1bb2ea363e8a9d86b24338df3584abc93ebc6dd4
2018-03-24 20:10:41 +01:00
Neels Hofmeyr 8b8cd93817 fix gsm0808_enc_cell_id_list2 for leading-zero MNC
Use non-deprecated API to decode encode in gsm0808_enc_cell_id_list2().

Adjust gsm0808_test.c to now expect the correct results instead of previous
failure.

Change-Id: I1ce78883995e0d484368046b69db5afb2b4adc97
2018-03-23 12:47:05 +00:00
Neels Hofmeyr c44fc23fee show failure in gsm0808_enc_cell_id_list2() in gsm0808_test
Change-Id: I763b18d2922701ad97382269747ff0cbb7bd657b
2018-03-23 12:31:29 +00:00
Neels Hofmeyr 473485c903 gsm0808_test: cosmetic: test non-hex MCC
The test currently sets the MCC by a hex value, which is a weird choice. The
MCC gets BCD'd and hence we will see the decimal values 1:1 in the encoded
octets as hex digits. Using hex as input obscures that:

Right now it sets mcc = 0x123, which is actually 291 in decimal, and we hence
see "92 .1" in the expected BCD result. Using 0x124 in the test source actually
makes it hard to see where the 0x123 went.

Change the MCC to decimal notation (123, 124, 125) and adjust the expected
encoded output.

Change-Id: I973835c54a90fefe50d2b3581324d12556715f58
2018-03-23 12:25:13 +00:00
Neels Hofmeyr c1991df2c4 gsm0808_test: cosmetic: re-arrange struct init; print hexdump on failure
I am going to ehance the test to actually include leading-zero MNC, but first I
would like to simplify how the test source struct is initialized, before I edit
around in it.

Also, when the memcmp() fails, print hexdumps of expected and actual result for
comparison. I needed it to figure out a test failure, might as well keep it.

Change-Id: I77cd4b9142510c6914298b720d9c19ab68f9ebef
2018-03-23 12:25:04 +00:00
Philipp Maier 7e27b14ef2 gsm_08_08: correct speech codec defaults
The speech codec defaults are not correct. The defaults recommended
in 3GPP TS 28.062, Table 7.11.3.1.3-2 are limited by 3GPP TS 48.008,
Section 3.2.2.103. Some defaults are actually reserved for future
use. Also the endianess of the 16 bit values is reversed.

- correct values so that they match the specification
- transmit bytes in the correct endianess

Change-Id: I6c3a34d39a375d71c4128fd38f06629e8b98b100
2018-03-23 11:59:29 +00:00
Daniel Willmann 04a2a3231f fsm: Update the name as well if the id is updated and accept NULL
If the name stays the same the log messages will still log with the old
id. Since we can now change the id we need to update the name as well.

NULL as id was allowed before so we should allow that as well.

Change-Id: I6b01eb10b8a05fee3e4a5cdefdcf3ce9f79545b4
2018-03-19 20:28:11 +00:00